diff options
author | Jonathan Duran | 2012-06-26 13:52:33 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-06-26 13:52:33 -0700 |
commit | e4304b9ac6c58802de4dd334be1f5802533f5160 (patch) | |
tree | d2de06b6534f8de1b29870954fcc8b4d13c91300 /js/panels/Timeline/Layer.reel/Layer.js | |
parent | 5f07a68a6b97bf7e3549112dedf5676744846971 (diff) | |
parent | 9aa987003f0c7866e66aabcc7d9cc2b9da8ed91c (diff) | |
download | ninja-e4304b9ac6c58802de4dd334be1f5802533f5160.tar.gz |
Merge branch 'refs/heads/timeline-local' into TimelineUber
Diffstat (limited to 'js/panels/Timeline/Layer.reel/Layer.js')
-rw-r--r-- | js/panels/Timeline/Layer.reel/Layer.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index 776d5ec8..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 | ||
@@ -945,12 +953,14 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
945 | this.isMainCollapsed = false; | 953 | this.isMainCollapsed = false; |
946 | } else { | 954 | } else { |
947 | this.isMainCollapsed = true; | 955 | this.isMainCollapsed = true; |
956 | this.application.ninja.timeline.synchScrollbars(43); | ||
948 | } | 957 | } |
949 | this.triggerOutgoingBinding(); | 958 | this.triggerOutgoingBinding(); |
950 | } | 959 | } |
951 | }, | 960 | }, |
952 | handlePositionCollapserClick : { | 961 | handlePositionCollapserClick : { |
953 | value: function(event) { | 962 | value: function(event) { |
963 | var myHeight = this.positionCollapser.element.offsetHeight; | ||
954 | this.positionCollapser.bypassAnimation = false; | 964 | this.positionCollapser.bypassAnimation = false; |
955 | this.bypassAnimation = false; | 965 | this.bypassAnimation = false; |
956 | this.layerData.bypassAnimation = false; | 966 | this.layerData.bypassAnimation = false; |
@@ -958,12 +968,14 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
958 | this.isPositionCollapsed = false; | 968 | this.isPositionCollapsed = false; |
959 | } else { | 969 | } else { |
960 | this.isPositionCollapsed = true; | 970 | this.isPositionCollapsed = true; |
971 | this.application.ninja.timeline.synchScrollbars(myHeight); | ||
961 | } | 972 | } |
962 | this.triggerOutgoingBinding(); | 973 | this.triggerOutgoingBinding(); |
963 | } | 974 | } |
964 | }, | 975 | }, |
965 | handleStyleCollapserClick : { | 976 | handleStyleCollapserClick : { |
966 | value: function(event) { | 977 | value: function(event) { |
978 | var myHeight = this.styleCollapser.element.offsetHeight; | ||
967 | this.styleCollapser.bypassAnimation = false; | 979 | this.styleCollapser.bypassAnimation = false; |
968 | this.bypassAnimation = false; | 980 | this.bypassAnimation = false; |
969 | this.layerData.bypassAnimation = false; | 981 | this.layerData.bypassAnimation = false; |
@@ -971,6 +983,7 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
971 | this.isStyleCollapsed = false; | 983 | this.isStyleCollapsed = false; |
972 | } else { | 984 | } else { |
973 | this.isStyleCollapsed = true; | 985 | this.isStyleCollapsed = true; |
986 | this.application.ninja.timeline.synchScrollbars(myHeight); | ||
974 | } | 987 | } |
975 | this.triggerOutgoingBinding(); | 988 | this.triggerOutgoingBinding(); |
976 | } | 989 | } |