aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Reid2012-06-26 12:34:30 -0700
committerJon Reid2012-06-26 12:34:30 -0700
commit390e5f7e3ba41ef0c71d1f944d926f9eee0c8846 (patch)
tree67a13f0539dbd426d9f45bd38e73b5f78e091ddb
parentd506220a65f2edf195b3b43aa7dbd47839a7eef7 (diff)
downloadninja-390e5f7e3ba41ef0c71d1f944d926f9eee0c8846.tar.gz
Timeline: Bug fix IKNINJA-1816
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js5
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js26
2 files changed, 31 insertions, 0 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 776d5ec8..a8c22b2a 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -945,12 +945,14 @@ var Layer = exports.Layer = Montage.create(Component, {
945 this.isMainCollapsed = false; 945 this.isMainCollapsed = false;
946 } else { 946 } else {
947 this.isMainCollapsed = true; 947 this.isMainCollapsed = true;
948 this.application.ninja.timeline.synchScrollbars(43);
948 } 949 }
949 this.triggerOutgoingBinding(); 950 this.triggerOutgoingBinding();
950 } 951 }
951 }, 952 },
952 handlePositionCollapserClick : { 953 handlePositionCollapserClick : {
953 value: function(event) { 954 value: function(event) {
955 var myHeight = this.positionCollapser.element.offsetHeight;
954 this.positionCollapser.bypassAnimation = false; 956 this.positionCollapser.bypassAnimation = false;
955 this.bypassAnimation = false; 957 this.bypassAnimation = false;
956 this.layerData.bypassAnimation = false; 958 this.layerData.bypassAnimation = false;
@@ -958,12 +960,14 @@ var Layer = exports.Layer = Montage.create(Component, {
958 this.isPositionCollapsed = false; 960 this.isPositionCollapsed = false;
959 } else { 961 } else {
960 this.isPositionCollapsed = true; 962 this.isPositionCollapsed = true;
963 this.application.ninja.timeline.synchScrollbars(myHeight);
961 } 964 }
962 this.triggerOutgoingBinding(); 965 this.triggerOutgoingBinding();
963 } 966 }
964 }, 967 },
965 handleStyleCollapserClick : { 968 handleStyleCollapserClick : {
966 value: function(event) { 969 value: function(event) {
970 var myHeight = this.styleCollapser.element.offsetHeight;
967 this.styleCollapser.bypassAnimation = false; 971 this.styleCollapser.bypassAnimation = false;
968 this.bypassAnimation = false; 972 this.bypassAnimation = false;
969 this.layerData.bypassAnimation = false; 973 this.layerData.bypassAnimation = false;
@@ -971,6 +975,7 @@ var Layer = exports.Layer = Montage.create(Component, {
971 this.isStyleCollapsed = false; 975 this.isStyleCollapsed = false;
972 } else { 976 } else {
973 this.isStyleCollapsed = true; 977 this.isStyleCollapsed = true;
978 this.application.ninja.timeline.synchScrollbars(myHeight);
974 } 979 }
975 this.triggerOutgoingBinding(); 980 this.triggerOutgoingBinding();
976 } 981 }
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 470062ba..ceb37db6 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -243,6 +243,10 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
243 value: false 243 value: false
244 }, 244 },
245 245
246 _areTracksCollapsing: {
247 value: false
248 },
249
246 _currentOpenSpanMenu: { 250 _currentOpenSpanMenu: {
247 value: false 251 value: false
248 }, 252 },
@@ -687,6 +691,14 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
687 // We have shuffled layers, so we need to update this.selectedLayers. 691 // We have shuffled layers, so we need to update this.selectedLayers.
688 this.selectLayers([]) 692 this.selectLayers([])
689 } 693 }
694
695 // Do we need to scroll the layers?
696 if (this._areTracksCollapsing !== false) {
697 //console.log("diddraw: user_layers, layout_tracks", this.user_layers.scrollTop, this.layout_tracks.scrollTop);
698 //this.layout_tracks.scrollTop = this.user_layers.scrollTop;\
699 this.layout_tracks.scrollTop = this._areTracksCollapsing;
700 this._areTracksCollapsing = false;
701 }
690 } 702 }
691 }, 703 },
692 704
@@ -1097,11 +1109,25 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1097 this.drawTimeMarkers(); 1109 this.drawTimeMarkers();
1098 } 1110 }
1099 }, 1111 },
1112
1113 synchScrollbars: {
1114 value: function(intScrollBy) {
1115 //this.updateLayerScroll();
1116 //this.user_layers.scrollTop = 0;
1117 //this.layout_tracks.scrollTop = this.user_layers.scrollTop;
1118 //console.log("synch: user_layers, layout_tracks", this.user_layers.scrollTop, this.layout_tracks.scrollTop);
1119 this._areTracksCollapsing = this.layout_tracks.scrollTop - intScrollBy;
1120 this.needsDraw = true;
1121
1122 }
1123 },
1100 1124
1101 updateLayerScroll:{ 1125 updateLayerScroll:{
1102 value:function () { 1126 value:function () {
1127 //console.log("TimelinePanel.updateLayerScroll")
1103 this._areTracksScrolling = true; 1128 this._areTracksScrolling = true;
1104 this.needsDraw = true; 1129 this.needsDraw = true;
1130
1105 } 1131 }
1106 }, 1132 },
1107 1133