aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels')
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js54
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html15
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js1
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js85
4 files changed, 127 insertions, 28 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 5206ae16..b54d6ce0 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -314,9 +314,11 @@ 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;
321 // this.triggerOutgoingBinding();
320 } 322 }
321 } 323 }
322 }, 324 },
@@ -333,6 +335,8 @@ var Layer = exports.Layer = Montage.create(Component, {
333 set: function(newVal) { 335 set: function(newVal) {
334 if (newVal !== this._isTransformCollapsed) { 336 if (newVal !== this._isTransformCollapsed) {
335 this._isTransformCollapsed = newVal; 337 this._isTransformCollapsed = newVal;
338 this.layerData.isTransformCollapsed = newVal;
339 this.triggerOutgoingBinding();
336 //this.needsDraw = true; 340 //this.needsDraw = true;
337 } 341 }
338 } 342 }
@@ -350,6 +354,8 @@ var Layer = exports.Layer = Montage.create(Component, {
350 set: function(newVal) { 354 set: function(newVal) {
351 if (newVal !== this._isPositionCollapsed) { 355 if (newVal !== this._isPositionCollapsed) {
352 this._isPositionCollapsed = newVal; 356 this._isPositionCollapsed = newVal;
357 this.layerData.isPositionCollapsed = newVal;
358 this.triggerOutgoingBinding();
353 //this.needsDraw = true; 359 //this.needsDraw = true;
354 } 360 }
355 } 361 }
@@ -367,6 +373,8 @@ var Layer = exports.Layer = Montage.create(Component, {
367 set: function(newVal) { 373 set: function(newVal) {
368 if (newVal !== this._isStyleCollapsed) { 374 if (newVal !== this._isStyleCollapsed) {
369 this._isStyleCollapsed = newVal; 375 this._isStyleCollapsed = newVal;
376 this.layerData.isStyleCollapsed = newVal;
377 this.triggerOutgoingBinding();
370 //this.needsDraw = true; 378 //this.needsDraw = true;
371 } 379 }
372 } 380 }
@@ -381,7 +389,11 @@ var Layer = exports.Layer = Montage.create(Component, {
381 return this._bypassAnimation; 389 return this._bypassAnimation;
382 }, 390 },
383 set: function(newVal) { 391 set: function(newVal) {
384 this._bypassAnimation = newVal; 392 if (newVal !== this._bypassAnimation) {
393 this._bypassAnimation = newVal;
394 this.layerData.bypassAnimation = newVal;
395 //this.triggerOutgoingBinding();
396 }
385 } 397 }
386 }, 398 },
387 399
@@ -426,6 +438,36 @@ var Layer = exports.Layer = Montage.create(Component, {
426 this.needsDraw = true; 438 this.needsDraw = true;
427 } 439 }
428 }, 440 },
441
442 /* Data binding point and outgoing binding trigger method */
443 _bindingPoint : {
444 serializable: true,
445 value : {}
446 },
447 bindingPoint: {
448 serializable: true,
449 get: function() {
450 return this._bindingPoint;
451 },
452 set: function(newVal) {
453 if (newVal !== this._bindingPoint) {
454 this._bindingPoint = newVal;
455 this.setData();
456 }
457 }
458 },
459
460 triggerOutgoingBinding : {
461 value: function() {
462 if (this.layerData.triggerBinding === true) {
463 this.layerData.triggerBinding = false;
464 } else {
465 this.layerData.triggerBinding = true;
466 }
467 }
468 },
469
470 // Is this the first draw?
429 _isFirstDraw : { 471 _isFirstDraw : {
430 value: true 472 value: true
431 }, 473 },
@@ -700,44 +742,52 @@ var Layer = exports.Layer = Montage.create(Component, {
700 value: function(event) { 742 value: function(event) {
701 this.mainCollapser.bypassAnimation = false; 743 this.mainCollapser.bypassAnimation = false;
702 this.bypassAnimation = false; 744 this.bypassAnimation = false;
745 this.layerData.bypassAnimation = false;
703 if (this.isMainCollapsed) { 746 if (this.isMainCollapsed) {
704 this.isMainCollapsed = false; 747 this.isMainCollapsed = false;
705 } else { 748 } else {
706 this.isMainCollapsed = true; 749 this.isMainCollapsed = true;
707 } 750 }
751 this.triggerOutgoingBinding();
708 } 752 }
709 }, 753 },
710 handlePositionCollapserClick : { 754 handlePositionCollapserClick : {
711 value: function(event) { 755 value: function(event) {
712 this.positionCollapser.bypassAnimation = false; 756 this.positionCollapser.bypassAnimation = false;
713 this.bypassAnimation = false; 757 this.bypassAnimation = false;
758 this.layerData.bypassAnimation = false;
714 if (this.isPositionCollapsed) { 759 if (this.isPositionCollapsed) {
715 this.isPositionCollapsed = false; 760 this.isPositionCollapsed = false;
716 } else { 761 } else {
717 this.isPositionCollapsed = true; 762 this.isPositionCollapsed = true;
718 } 763 }
764 this.triggerOutgoingBinding();
719 } 765 }
720 }, 766 },
721 handleTransformCollapserClick : { 767 handleTransformCollapserClick : {
722 value: function(event) { 768 value: function(event) {
723 this.transformCollapser.bypassAnimation = false; 769 this.transformCollapser.bypassAnimation = false;
724 this.bypassAnimation = false; 770 this.bypassAnimation = false;
771 this.layerData.bypassAnimation = false;
725 if (this.isTransformCollapsed) { 772 if (this.isTransformCollapsed) {
726 this.isTransformCollapsed = false; 773 this.isTransformCollapsed = false;
727 } else { 774 } else {
728 this.isTransformCollapsed = true; 775 this.isTransformCollapsed = true;
729 } 776 }
777 this.triggerOutgoingBinding();
730 } 778 }
731 }, 779 },
732 handleStyleCollapserClick : { 780 handleStyleCollapserClick : {
733 value: function(event) { 781 value: function(event) {
734 this.styleCollapser.bypassAnimation = false; 782 this.styleCollapser.bypassAnimation = false;
735 this.bypassAnimation = false; 783 this.bypassAnimation = false;
784 this.layerData.bypassAnimation = false;
736 if (this.isStyleCollapsed) { 785 if (this.isStyleCollapsed) {
737 this.isStyleCollapsed = false; 786 this.isStyleCollapsed = false;
738 } else { 787 } else {
739 this.isStyleCollapsed = true; 788 this.isStyleCollapsed = true;
740 } 789 }
790 this.triggerOutgoingBinding();
741 } 791 }
742 }, 792 },
743 /* End: Event handlers */ 793 /* End: Event handlers */
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
index 14c5f1c8..34860ae7 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
@@ -77,7 +77,12 @@
77 "boundObject" : {"@" : "repetition1"}, 77 "boundObject" : {"@" : "repetition1"},
78 "boundObjectPropertyPath" : "objectAtCurrentIteration.layerData", 78 "boundObjectPropertyPath" : "objectAtCurrentIteration.layerData",
79 "oneway" : false 79 "oneway" : false
80 } 80 },
81 "bindingPoint" : {
82 "boundObject" : {"@" : "repetition1"},
83 "boundObjectPropertyPath" : "objectAtCurrentIteration.layerData.triggerBinding",
84 "oneway" : false
85 }
81 } 86 }
82 }, 87 },
83 88
@@ -107,7 +112,13 @@
107 "boundObject" : {"@" : "repetition2"}, 112 "boundObject" : {"@" : "repetition2"},
108 "boundObjectPropertyPath" : "objectAtCurrentIteration.layerData", 113 "boundObjectPropertyPath" : "objectAtCurrentIteration.layerData",
109 "oneway" : false 114 "oneway" : false
115 },
116 "bindingPoint" : {
117 "boundObject" : {"@" : "repetition2"},
118 "boundObjectPropertyPath" : "objectAtCurrentIteration.layerData.triggerBinding",
119 "oneway" : false
110 } 120 }
121
111 } 122 }
112 }, 123 },
113 "endHottext" : {