aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelineTrack.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js85
1 files changed, 62 insertions, 23 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index c6b67c9c..b9a4574c 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -26,8 +26,9 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
26 return this._trackID; 26 return this._trackID;
27 }, 27 },
28 set:function (value) { 28 set:function (value) {
29 this._trackID = value; 29 if (value !== this._trackID) {
30 //this.needsDraw = true; 30 this._trackID = value;
31 }
31 } 32 }
32 }, 33 },
33 34
@@ -40,11 +41,9 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
40 return this._isMainCollapsed; 41 return this._isMainCollapsed;
41 }, 42 },
42 set:function (newVal) { 43 set:function (newVal) {
43 this.log('TimelineTrack.js: isMainCollapsed: ', newVal);
44 if (newVal !== this._isMainCollapsed) { 44 if (newVal !== this._isMainCollapsed) {
45 this._isMainCollapsed = newVal; 45 this._isMainCollapsed = newVal;
46 } 46 }
47
48 } 47 }
49 }, 48 },
50 _isTransformCollapsed:{ 49 _isTransformCollapsed:{
@@ -96,8 +95,12 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
96 return this._bypassAnimation; 95 return this._bypassAnimation;
97 }, 96 },
98 set: function(newVal) { 97 set: function(newVal) {
99 //console.log("timelinetrack bypassAnimation setter " + newVal) 98 if (newVal !== this._bypassAnimation) {
100 this._bypassAnimation = newVal; 99 this._bypassAnimation = newVal;
100 }
101 if (this.trackData.bypassAnimation !== newVal) {
102 this.trackData.bypassAnimation = newVal;
103 }
101 } 104 }
102 }, 105 },
103 106
@@ -347,7 +350,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
347 }, 350 },
348 351
349 _trackData:{ 352 _trackData:{
350 353 serializable: true,
354 value: false
351 }, 355 },
352 356
353 trackData:{ 357 trackData:{
@@ -358,30 +362,65 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
358 set:function(val){ 362 set:function(val){
359 this._trackData = val; 363 this._trackData = val;
360 if(this._trackData){ 364 if(this._trackData){
361 this.setData(); 365 this.setData();
362 } 366 }
363 } 367 }
364 }, 368 },
369
370 _setDataTimestamp : {
371 value: false
372 },
365 373
366 setData:{ 374 setData:{
367 value:function(){ 375 value:function(){
368 this.trackID = this.trackData.layerID; 376 if (this.trackData) {
369 this.tweens = this.trackData.tweens; 377 this.bypassAnimation = this.trackData.bypassAnimation;
370 this.animatedElement = this.trackData.animatedElement; 378 this.trackID = this.trackData.layerID;
371 this.arrStyleTracks = this.trackData.arrStyleTracks; 379 this.tweens = this.trackData.tweens;
372 this.isTrackAnimated = this.trackData.isTrackAnimated; 380 this.animatedElement = this.trackData.animatedElement;
373 this.trackDuration = this.trackData.trackDuration; 381 this.arrStyleTracks = this.trackData.arrStyleTracks;
374 this.animationName = this.trackData.animationName; 382 this.isTrackAnimated = this.trackData.isTrackAnimated;
375 this.currentKeyframeRule = this.trackData.currentKeyframeRule; 383 this.trackDuration = this.trackData.trackDuration;
376 this.isMainCollapsed = this.trackData.isMainCollapsed; 384 this.animationName = this.trackData.animationName;
377 this.isPositionCollapsed = this.trackData.isPositionCollapsed; 385 this.currentKeyframeRule = this.trackData.currentKeyframeRule;
378 this.isTransformCollapsed = this.trackData.isTransformCollapsed; 386 this.isMainCollapsed = this.trackData.isMainCollapsed;
379 this.bypassAnimation = this.trackData.bypassAnimation; 387 this.isPositionCollapsed = this.trackData.isPositionCollapsed;
380 this.isStyleCollapsed = this.trackData.isStyleCollapsed; 388 this.isTransformCollapsed = this.trackData.isTransformCollapsed;
381 this.trackPosition = this.trackData.trackPosition; 389 this.isStyleCollapsed = this.trackData.isStyleCollapsed;
382 this.needsDraw = true; 390 this.trackPosition = this.trackData.trackPosition;
391 this.needsDraw = true;
392 }
393
383 } 394 }
384 }, 395 },
396
397 // Data binding observation point and trigger method
398 _bindingPoint : {
399 serializable: true,
400 value : {}
401 },
402 bindingPoint: {
403 serializable: true,
404 get: function() {
405 return this._bindingPoint;
406 },
407 set: function(newVal) {
408 if (newVal !== this._bindingPoint) {
409 this._bindingPoint = newVal;
410 this.setData();
411 }
412 }
413 },
414
415 triggerOutgoingBinding : {
416 value: function() {
417 if (this.trackData.triggerBinding === true) {
418 this.trackData.triggerBinding = false;
419 } else {
420 this.trackData.triggerBinding = true;
421 }
422 }
423 },
385 424
386 prepareForDraw:{ 425 prepareForDraw:{
387 value:function () { 426 value:function () {