aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
authorKruti Shah2012-07-18 12:23:54 -0700
committerKruti Shah2012-07-18 12:23:54 -0700
commit0b899ad6cec5e4626dfa32230be7c04d22d4f820 (patch)
tree95cb00b81a9f8e2a4ca10fc11614648a6891f3e9 /js/panels
parent0e18e829e4cb81fec9230db6f23c64fd10851a74 (diff)
downloadninja-0b899ad6cec5e4626dfa32230be7c04d22d4f820.tar.gz
The zoom slider position remembered between multi doc switch
Signed-off-by: Kruti Shah <kruti.shah@motorola.com>
Diffstat (limited to 'js/panels')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html3
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js20
2 files changed, 15 insertions, 8 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
index c287e68e..593b4ea1 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
@@ -63,7 +63,8 @@ POSSIBILITY OF SUCH DAMAGE.
63 "tl_configbutton" : {"#" : "tl-configbutton"}, 63 "tl_configbutton" : {"#" : "tl-configbutton"},
64 "checkable_lock" : {"#" : "checkable_lock"}, 64 "checkable_lock" : {"#" : "checkable_lock"},
65 "checkable_visible":{"#" : "checkable_visible"}, 65 "checkable_visible":{"#" : "checkable_visible"},
66 "play_button" : {"#" : "play_button"} 66 "play_button" : {"#" : "play_button"},
67 "zoom_slider" : {"@" : "timelineZoomSlider"}
67 } 68 }
68 }, 69 },
69 70
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 6cc08cdf..05b9335a 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -511,7 +511,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
511 set:function (newVal) { 511 set:function (newVal) {
512 if (newVal !== this._millisecondsOffset) { 512 if (newVal !== this._millisecondsOffset) {
513 513
514 this.tempValue = newVal; 514 this.zoomValue = newVal;
515 var tempValue = (1/newVal) * 1000000; 515 var tempValue = (1/newVal) * 1000000;
516 newVal = tempValue; 516 newVal = tempValue;
517 517
@@ -1115,7 +1115,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1115 this.currentLayersSelected = this.application.ninja.currentDocument.tlCurrentLayersSelected; 1115 this.currentLayersSelected = this.application.ninja.currentDocument.tlCurrentLayersSelected;
1116 this.currentElementsSelected = this.application.ninja.currentDocument.tlCurrentElementsSelected; 1116 this.currentElementsSelected = this.application.ninja.currentDocument.tlCurrentElementsSelected;
1117 this._currentDocumentUuid = this.application.ninja.currentDocument.uuid; 1117 this._currentDocumentUuid = this.application.ninja.currentDocument.uuid;
1118 1118 this.millisecondsOffset = this.application.ninja.currentDocument.tlZoomSliderValue ;
1119 this.zoom_slider.value = this.application.ninja.currentDocument.tlZoomSliderValue;
1119 1120
1120 // Are we only showing animated layers? 1121 // Are we only showing animated layers?
1121 if (this.application.ninja.currentDocument.boolShowOnlyAnimated) { 1122 if (this.application.ninja.currentDocument.boolShowOnlyAnimated) {
@@ -1706,12 +1707,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1706 zoomTrackContainerWidthChange:{ 1707 zoomTrackContainerWidthChange:{
1707 value:function () { 1708 value:function () {
1708 1709
1709 this.tempValue = this.tempValue/1000; 1710 if(this.application.ninja.currentDocument){
1710 this.tempValue *= 30; 1711 this.application.ninja.currentDocument.tlZoomSliderValue = this.zoomValue;
1712
1713 }
1714
1715 this.zoomValue = this.zoomValue/1000;
1716 this.zoomValue *= 30;
1711 1717
1712 this.container_tracks.style.width = (this.tempValue * 80) + "px"; 1718 this.container_tracks.style.width = (this.zoomValue * 80) + "px";
1713 this.master_track.style.width = (this.tempValue * 80) + "px"; 1719 this.master_track.style.width = (this.zoomValue * 80) + "px";
1714 this.time_markers.style.width = (this.tempValue * 80) + "px"; 1720 this.time_markers.style.width = (this.zoomValue * 80) + "px";
1715 if (this.timeMarkerHolder) { 1721 if (this.timeMarkerHolder) {
1716 this.time_markers.removeChild(this.timeMarkerHolder); 1722 this.time_markers.removeChild(this.timeMarkerHolder);
1717 } 1723 }