diff options
author | Jose Antonio Marquez | 2012-06-13 14:03:00 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-06-13 14:03:00 -0700 |
commit | efbe5f83157a8dcbcc209c88877d9cd0113d4d20 (patch) | |
tree | 50565e097fe4a9db59e554af179f66938fa59f1c /js/panels/Timeline/TimelineTrack.reel | |
parent | ae90152ae2889a10d44c22e1eeb5bff16cc44a19 (diff) | |
parent | 682f4917d6badd105998c3dd84d031c38b51f017 (diff) | |
download | ninja-efbe5f83157a8dcbcc209c88877d9cd0113d4d20.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Color
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel')
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html | 8 | ||||
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 83 |
2 files changed, 82 insertions, 9 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html index 5c5a8b76..091470f3 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html | |||
@@ -16,10 +16,10 @@ | |||
16 | "element": {"#": "track"}, | 16 | "element": {"#": "track"}, |
17 | "tweenRepetition" : {"@" : "tweenRepetition"}, | 17 | "tweenRepetition" : {"@" : "tweenRepetition"}, |
18 | "tween": {"@" : "tween"}, | 18 | "tween": {"@" : "tween"}, |
19 | "_mainCollapser" : {"@" : "mainCollapser"}, | 19 | "mainCollapser" : {"@" : "mainCollapser"}, |
20 | "_positionCollapser" : {"@" : "positionCollapser"}, | 20 | "positionCollapser" : {"@" : "positionCollapser"}, |
21 | "_transformCollapser" : {"@" : "transformCollapser"}, | 21 | "transformCollapser" : {"@" : "transformCollapser"}, |
22 | "_styleCollapser" : {"@" : "styleCollapser"} | 22 | "styleCollapser" : {"@" : "styleCollapser"} |
23 | } | 23 | } |
24 | }, | 24 | }, |
25 | 25 | ||
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 126e6a61..87a5e156 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | |||
@@ -11,10 +11,6 @@ var defaultEventManager = require("montage/core/event/event-manager").defaultEve | |||
11 | 11 | ||
12 | var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | 12 | var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { |
13 | 13 | ||
14 | hasTemplate:{ | ||
15 | value:true | ||
16 | }, | ||
17 | |||
18 | _trackID:{ | 14 | _trackID:{ |
19 | value:null | 15 | value:null |
20 | }, | 16 | }, |
@@ -31,6 +27,21 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
31 | } | 27 | } |
32 | } | 28 | } |
33 | }, | 29 | }, |
30 | |||
31 | _tween:{ | ||
32 | value:[] | ||
33 | }, | ||
34 | |||
35 | tween:{ | ||
36 | serializable:true, | ||
37 | get:function () { | ||
38 | return this._tween; | ||
39 | }, | ||
40 | set:function (newVal) { | ||
41 | this._tween = newVal; | ||
42 | } | ||
43 | }, | ||
44 | |||
34 | _isVisible:{ | 45 | _isVisible:{ |
35 | value: true | 46 | value: true |
36 | }, | 47 | }, |
@@ -155,7 +166,11 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
155 | }, | 166 | }, |
156 | set: function(newVal) { | 167 | set: function(newVal) { |
157 | this._arrPositionTracks = newVal; | 168 | this._arrPositionTracks = newVal; |
158 | this.trackData.arrPositionTracks = newVal; | 169 | if (typeof(this.trackData) === "undefined") { |
170 | //this.createTrackData(); | ||
171 | } | ||
172 | this.trackData.arrPositionTracks = newVal; | ||
173 | |||
159 | } | 174 | } |
160 | }, | 175 | }, |
161 | _positionTracksRepetition: { | 176 | _positionTracksRepetition: { |
@@ -333,21 +348,58 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
333 | _positionCollapser:{ | 348 | _positionCollapser:{ |
334 | value:null | 349 | value:null |
335 | }, | 350 | }, |
351 | positionCollapser:{ | ||
352 | serializable:true, | ||
353 | get:function(){ | ||
354 | return this._positionCollapser; | ||
355 | }, | ||
356 | set:function(val){ | ||
357 | this._positionCollapser = val; | ||
358 | } | ||
359 | }, | ||
336 | _mainCollapser:{ | 360 | _mainCollapser:{ |
337 | value:null | 361 | value:null |
338 | }, | 362 | }, |
363 | mainCollapser:{ | ||
364 | serializable:true, | ||
365 | get:function () { | ||
366 | return this._mainCollapser; | ||
367 | }, | ||
368 | set:function (val) { | ||
369 | this._mainCollapser = val; | ||
370 | } | ||
371 | }, | ||
339 | _transformCollapser:{ | 372 | _transformCollapser:{ |
340 | value:null | 373 | value:null |
341 | }, | 374 | }, |
375 | transformCollapser:{ | ||
376 | serializable:true, | ||
377 | get:function () { | ||
378 | return this._transformCollapser; | ||
379 | }, | ||
380 | set:function (val) { | ||
381 | this._transformCollapser = val; | ||
382 | } | ||
383 | }, | ||
342 | _styleCollapser:{ | 384 | _styleCollapser:{ |
343 | value:null | 385 | value:null |
344 | }, | 386 | }, |
387 | styleCollapser:{ | ||
388 | serializable:true, | ||
389 | get:function () { | ||
390 | return this._styleCollapser; | ||
391 | }, | ||
392 | set:function (val) { | ||
393 | this._styleCollapser = val; | ||
394 | } | ||
395 | }, | ||
345 | 396 | ||
346 | _trackData:{ | 397 | _trackData:{ |
347 | value: false | 398 | value: false |
348 | }, | 399 | }, |
349 | 400 | ||
350 | trackData:{ | 401 | trackData:{ |
402 | serializable: true, | ||
351 | get:function(){ | 403 | get:function(){ |
352 | return this._trackData; | 404 | return this._trackData; |
353 | }, | 405 | }, |
@@ -386,6 +438,27 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
386 | this.needsDraw = true; | 438 | this.needsDraw = true; |
387 | } | 439 | } |
388 | }, | 440 | }, |
441 | createTrackData: { | ||
442 | value: function() { | ||
443 | tempData = {}; | ||
444 | tempData.bypassAnimation = this.bypassAnimation; | ||
445 | tempData.trackID = this.layerID; | ||
446 | tempData.tweens = this.tweens; | ||
447 | tempData.animatedElement = this.animatedElement; | ||
448 | tempData.arrStyleTracks = this.arrStyleTracks; | ||
449 | tempData.isTrackAnimated = this.isTrackAnimated; | ||
450 | tempData.trackDuration = this.trackDuration; | ||
451 | tempData.animationName = this.animationName; | ||
452 | tempData.currentKeyframeRule = this.currentKeyframeRule; | ||
453 | tempData.isMainCollapsed = this.isMainCollapsed; | ||
454 | tempData.isPositionCollapsed = this.isPositionCollapsed; | ||
455 | tempData.isTransformCollapsed = this.isTransformCollapsed; | ||
456 | tempData.isStyleCollapsed = this.isStyleCollapsed; | ||
457 | tempData.trackPosition = this.trackPosition; | ||
458 | tempData.isVisible = this.isVisible; | ||
459 | this.trackData = tempData; | ||
460 | } | ||
461 | }, | ||
389 | 462 | ||
390 | // Data binding observation point and trigger method | 463 | // Data binding observation point and trigger method |
391 | _bindingPoint : { | 464 | _bindingPoint : { |