diff options
Diffstat (limited to 'js/panels/Timeline/Layer.reel/Layer.js')
-rw-r--r-- | js/panels/Timeline/Layer.reel/Layer.js | 14 |
1 files changed, 11 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 | ||