aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js55
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html15
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js54
3 files changed, 107 insertions, 17 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 5206ae16..238ddae9 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -314,9 +314,10 @@ var Layer = exports.Layer = Montage.create(Component, {
314 return this._isMainCollapsed; 314 return this._isMainCollapsed;
315 }, 315 },
316 set: function(newVal) { 316 set: function(newVal) {
317 this.log('layer.js: isMainCollapsed: ' + newVal);
318 if (newVal !== this._isMainCollapsed) { 317 if (newVal !== this._isMainCollapsed) {
318 this.log('layer.js: isMainCollapsed: ' + newVal);
319 this._isMainCollapsed = newVal; 319 this._isMainCollapsed = newVal;
320 this.layerData.isMainCollapsed = newVal;
320 } 321 }
321 } 322 }
322 }, 323 },
@@ -333,7 +334,7 @@ var Layer = exports.Layer = Montage.create(Component, {
333 set: function(newVal) { 334 set: function(newVal) {
334 if (newVal !== this._isTransformCollapsed) { 335 if (newVal !== this._isTransformCollapsed) {
335 this._isTransformCollapsed = newVal; 336 this._isTransformCollapsed = newVal;
336 //this.needsDraw = true; 337 this.layerData.isTransformCollapsed = newVal;
337 } 338 }
338 } 339 }
339 }, 340 },
@@ -350,7 +351,7 @@ var Layer = exports.Layer = Montage.create(Component, {
350 set: function(newVal) { 351 set: function(newVal) {
351 if (newVal !== this._isPositionCollapsed) { 352 if (newVal !== this._isPositionCollapsed) {
352 this._isPositionCollapsed = newVal; 353 this._isPositionCollapsed = newVal;
353 //this.needsDraw = true; 354 this.layerData.isPositionCollapsed = newVal;
354 } 355 }
355 } 356 }
356 }, 357 },
@@ -367,7 +368,7 @@ var Layer = exports.Layer = Montage.create(Component, {
367 set: function(newVal) { 368 set: function(newVal) {
368 if (newVal !== this._isStyleCollapsed) { 369 if (newVal !== this._isStyleCollapsed) {
369 this._isStyleCollapsed = newVal; 370 this._isStyleCollapsed = newVal;
370 //this.needsDraw = true; 371 this.layerData.isStyleCollapsed = newVal;
371 } 372 }
372 } 373 }
373 }, 374 },
@@ -381,7 +382,11 @@ var Layer = exports.Layer = Montage.create(Component, {
381 return this._bypassAnimation; 382 return this._bypassAnimation;
382 }, 383 },
383 set: function(newVal) { 384 set: function(newVal) {
384 this._bypassAnimation = newVal; 385 if (newVal !== this._bypassAnimation) {
386 this._bypassAnimation = newVal;
387 this.layerData.bypassAnimation = newVal;
388 //this.triggerOutgoingBinding();
389 }
385 } 390 }
386 }, 391 },
387 392
@@ -426,6 +431,36 @@ var Layer = exports.Layer = Montage.create(Component, {
426 this.needsDraw = true; 431 this.needsDraw = true;
427 } 432 }
428 }, 433 },
434
435 /* Data binding point and outgoing binding trigger method */
436 _bindingPoint : {
437 serializable: true,
438 value : {}
439 },
440 bindingPoint: {
441 serializable: true,
442 get: function() {
443 return this._bindingPoint;
444 },
445 set: function(newVal) {
446 if (newVal !== this._bindingPoint) {
447 this._bindingPoint = newVal;
448 this.setData();
449 }
450 }
451 },
452
453 triggerOutgoingBinding : {
454 value: function() {
455 if (this.layerData.triggerBinding === true) {
456 this.layerData.triggerBinding = false;
457 } else {
458 this.layerData.triggerBinding = true;
459 }
460 }
461 },
462
463 // Is this the first draw?
429 _isFirstDraw : { 464 _isFirstDraw : {
430 value: true 465 value: true
431 }, 466 },
@@ -700,44 +735,52 @@ var Layer = exports.Layer = Montage.create(Component, {
700 value: function(event) { 735 value: function(event) {
701 this.mainCollapser.bypassAnimation = false; 736 this.mainCollapser.bypassAnimation = false;
702 this.bypassAnimation = false; 737 this.bypassAnimation = false;
738 this.layerData.bypassAnimation = false;
703 if (this.isMainCollapsed) { 739 if (this.isMainCollapsed) {
704 this.isMainCollapsed = false; 740 this.isMainCollapsed = false;
705 } else { 741 } else {
706 this.isMainCollapsed = true; 742 this.isMainCollapsed = true;
707 } 743 }
744 this.triggerOutgoingBinding();
708 } 745 }
709 }, 746 },
710 handlePositionCollapserClick : { 747 handlePositionCollapserClick : {
711 value: function(event) { 748 value: function(event) {
712 this.positionCollapser.bypassAnimation = false; 749 this.positionCollapser.bypassAnimation = false;
713 this.bypassAnimation = false; 750 this.bypassAnimation = false;
751 this.layerData.bypassAnimation = false;
714 if (this.isPositionCollapsed) { 752 if (this.isPositionCollapsed) {
715 this.isPositionCollapsed = false; 753 this.isPositionCollapsed = false;
716 } else { 754 } else {
717 this.isPositionCollapsed = true; 755 this.isPositionCollapsed = true;
718 } 756 }
757 this.triggerOutgoingBinding();
719 } 758 }
720 }, 759 },
721 handleTransformCollapserClick : { 760 handleTransformCollapserClick : {
722 value: function(event) { 761 value: function(event) {
723 this.transformCollapser.bypassAnimation = false; 762 this.transformCollapser.bypassAnimation = false;
724 this.bypassAnimation = false; 763 this.bypassAnimation = false;
764 this.layerData.bypassAnimation = false;
725 if (this.isTransformCollapsed) { 765 if (this.isTransformCollapsed) {
726 this.isTransformCollapsed = false; 766 this.isTransformCollapsed = false;
727 } else { 767 } else {
728 this.isTransformCollapsed = true; 768 this.isTransformCollapsed = true;
729 } 769 }
770 this.triggerOutgoingBinding();
730 } 771 }
731 }, 772 },
732 handleStyleCollapserClick : { 773 handleStyleCollapserClick : {
733 value: function(event) { 774 value: function(event) {
734 this.styleCollapser.bypassAnimation = false; 775 this.styleCollapser.bypassAnimation = false;
735 this.bypassAnimation = false; 776 this.bypassAnimation = false;
777 this.layerData.bypassAnimation = false;
736 if (this.isStyleCollapsed) { 778 if (this.isStyleCollapsed) {
737 this.isStyleCollapsed = false; 779 this.isStyleCollapsed = false;
738 } else { 780 } else {
739 this.isStyleCollapsed = true; 781 this.isStyleCollapsed = true;
740 } 782 }
783 this.triggerOutgoingBinding();
741 } 784 }
742 }, 785 },
743 /* End: Event handlers */ 786 /* End: Event handlers */
@@ -773,4 +816,4 @@ var Layer = exports.Layer = Montage.create(Component, {
773 } 816 }
774 /* End: Logging routines */ 817 /* End: Logging routines */
775 818
776}); \ No newline at end of file 819});
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
index 9d7a1d44..6e7d410c 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
@@ -75,7 +75,12 @@
75 "boundObject" : {"@" : "repetition1"}, 75 "boundObject" : {"@" : "repetition1"},
76 "boundObjectPropertyPath" : "objectAtCurrentIteration.layerData", 76 "boundObjectPropertyPath" : "objectAtCurrentIteration.layerData",
77 "oneway" : false 77 "oneway" : false
78 } 78 },
79 "bindingPoint" : {
80 "boundObject" : {"@" : "repetition1"},
81 "boundObjectPropertyPath" : "objectAtCurrentIteration.layerData.triggerBinding",
82 "oneway" : false
83 }
79 } 84 }
80 }, 85 },
81 86
@@ -105,7 +110,13 @@
105 "boundObject" : {"@" : "repetition2"}, 110 "boundObject" : {"@" : "repetition2"},
106 "boundObjectPropertyPath" : "objectAtCurrentIteration.layerData", 111 "boundObjectPropertyPath" : "objectAtCurrentIteration.layerData",
107 "oneway" : false 112 "oneway" : false
113 },
114 "bindingPoint" : {
115 "boundObject" : {"@" : "repetition2"},
116 "boundObjectPropertyPath" : "objectAtCurrentIteration.layerData.triggerBinding",
117 "oneway" : false
108 } 118