aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js21
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js14
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js3
3 files changed, 34 insertions, 4 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 4941ff79..0abd97be 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -710,7 +710,15 @@ var Layer = exports.Layer = Montage.create(Component, {
710 // Set up the event info and dispatch the event 710 // Set up the event info and dispatch the event
711 this.styleCounter += 1; 711 this.styleCounter += 1;
712 // newEvent.styleSelection = mySelection; 712 // newEvent.styleSelection = mySelection;
713 defaultEventManager.dispatchEvent(newEvent); 713 //defaultEventManager.dispatchEvent(newEvent);
714
715 // Dispatch the event to the TimelineTrack component associated with this Layer.
716 var myIndex = this.application.ninja.timeline.getActiveLayerIndex(),
717 arrTracks = document.querySelectorAll('[data-montage-id="track"]');
718
719 if (myIndex !== false) {
720 arrTracks[myIndex].dispatchEvent(newEvent);
721 }
714 } 722 }
715 }, 723 },
716 724
@@ -728,8 +736,15 @@ var Layer = exports.Layer = Montage.create(Component, {
728 newEvent.layerID = this.layerID; 736 newEvent.layerID = this.layerID;
729 newEvent.styleID = this.selectedStyleIndex; 737 newEvent.styleID = this.selectedStyleIndex;
730 newEvent.selectedStyleIndex = this.selectedStyleIndex; 738 newEvent.selectedStyleIndex = this.selectedStyleIndex;
731 defaultEventManager.dispatchEvent(newEvent); 739
732 740 // Dispatch the event to the TimelineTrack component associated with this Layer.
741 var myIndex = this.application.ninja.timeline.getActiveLayerIndex(),
742 arrTracks = document.querySelectorAll('[data-montage-id="track"]');
743
744 if (myIndex !== false) {
745 arrTracks[myIndex].dispatchEvent(newEvent);
746 }
747
733 // Delete the style from the view 748 // Delete the style from the view
734 this.arrLayerStyles.splice(this.selectedStyleIndex, 1); 749 this.arrLayerStyles.splice(this.selectedStyleIndex, 1);
735 750
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 3d109bc1..27b3537c 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -1934,6 +1934,20 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1934 return false; 1934 return false;
1935 } 1935 }
1936 }, 1936 },
1937
1938 getActiveLayerIndex: {
1939 value: function() {
1940 var i = 0,
1941 returnVal = false,
1942 arrLayersLength = this.arrLayers.length;
1943 for (i = 0; i < arrLayersLength; i++) {
1944 if (this.arrLayers[i].isSelected === true) {
1945 returnVal = i;
1946 }
1947 }
1948 return returnVal;
1949 }
1950 },
1937 /* === END: Controllers === */ 1951 /* === END: Controllers === */
1938 1952
1939 /* === BEGIN: Logging routines === */ 1953 /* === BEGIN: Logging routines === */
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 6e09bb64..3db57a3a 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -974,7 +974,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
974 value:function () { 974 value:function () {
975 this.createPositionTracks(); 975 this.createPositionTracks();
976 // Register event handler for layer events. 976 // Register event handler for layer events.
977 defaultEventManager.addEventListener("layerEvent", this, false); 977 //defaultEventManager.addEventListener("layerEvent", this, false);
978 this.element.addEventListener("layerEvent", this, false);
978 } 979 }
979 }, 980 },
980 981