aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js14
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js14
2 files changed, 25 insertions, 3 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index a8c22b2a..2deb20da 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -752,12 +752,20 @@ var Layer = exports.Layer = Montage.create(Component, {
752 //defaultEventManager.dispatchEvent(newEvent); 752 //defaultEventManager.dispatchEvent(newEvent);
753 753
754 // Dispatch the event to the TimelineTrack component associated with this Layer. 754 // Dispatch the event to the TimelineTrack component associated with this Layer.
755 var myIndex = this.application.ninja.timeline.getActiveLayerIndex(), 755 var myIndex = false,
756 i = 0,
757 arrLayersLength = this.parentComponent.parentComponent.arrLayers.length,
756 arrTracks = document.querySelectorAll('[data-montage-id="track"]'); 758 arrTracks = document.querySelectorAll('[data-montage-id="track"]');
757 759
760 for (i = 0; i < arrLayersLength; i++) {
761 if (this.stageElement == this.parentComponent.parentComponent.arrLayers[i].layerData.stageElement) {
762 myIndex = i;
763 }
764 }
765
758 if (myIndex !== false) { 766 if (myIndex !== false) {
759 arrTracks[myIndex].dispatchEvent(newEvent); 767 arrTracks[myIndex].dispatchEvent(newEvent);
760 } 768 }
761 } 769 }
762 }, 770 },
763 771
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 98989022..d4eabbf5 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -72,6 +72,19 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
72 this.trackData.isVisible = value; 72 this.trackData.isVisible = value;
73 } 73 }
74 }, 74 },
75
76 _stageElement: {
77 value: null
78 },
79 stageElement: {
80 get: function() {
81 return this._stageElement;
82 },
83 set: function(newVal) {
84 this._stageElement = newVal;
85 this.trackData.stageElement = newVal;
86 }
87 },
75 88
76 // Are the various collapsers collapsed or not 89 // Are the various collapsers collapsed or not
77 _isMainCollapsed:{ 90 _isMainCollapsed:{
@@ -484,6 +497,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
484 this.isStyleCollapsed = this.trackData.isStyleCollapsed; 497 this.isStyleCollapsed = this.trackData.isStyleCollapsed;
485 this.trackPosition = this.trackData.trackPosition; 498 this.trackPosition = this.trackData.trackPosition;
486 this.isVisible = this.trackData.isVisible; 499 this.isVisible = this.trackData.isVisible;
500 this.stageElement = this.trackData.stageElement;
487 this.trackEditorProperty = "master"; 501 this.trackEditorProperty = "master";
488 this.needsDraw = true; 502 this.needsDraw = true;
489 } 503 }