From 0b899ad6cec5e4626dfa32230be7c04d22d4f820 Mon Sep 17 00:00:00 2001 From: Kruti Shah Date: Wed, 18 Jul 2012 12:23:54 -0700 Subject: The zoom slider position remembered between multi doc switch Signed-off-by: Kruti Shah --- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js') 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, { set:function (newVal) { if (newVal !== this._millisecondsOffset) { - this.tempValue = newVal; + this.zoomValue = newVal; var tempValue = (1/newVal) * 1000000; newVal = tempValue; @@ -1115,7 +1115,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this.currentLayersSelected = this.application.ninja.currentDocument.tlCurrentLayersSelected; this.currentElementsSelected = this.application.ninja.currentDocument.tlCurrentElementsSelected; this._currentDocumentUuid = this.application.ninja.currentDocument.uuid; - + this.millisecondsOffset = this.application.ninja.currentDocument.tlZoomSliderValue ; + this.zoom_slider.value = this.application.ninja.currentDocument.tlZoomSliderValue; // Are we only showing animated layers? if (this.application.ninja.currentDocument.boolShowOnlyAnimated) { @@ -1706,12 +1707,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { zoomTrackContainerWidthChange:{ value:function () { - this.tempValue = this.tempValue/1000; - this.tempValue *= 30; + if(this.application.ninja.currentDocument){ + this.application.ninja.currentDocument.tlZoomSliderValue = this.zoomValue; + + } + + this.zoomValue = this.zoomValue/1000; + this.zoomValue *= 30; - this.container_tracks.style.width = (this.tempValue * 80) + "px"; - this.master_track.style.width = (this.tempValue * 80) + "px"; - this.time_markers.style.width = (this.tempValue * 80) + "px"; + this.container_tracks.style.width = (this.zoomValue * 80) + "px"; + this.master_track.style.width = (this.zoomValue * 80) + "px"; + this.time_markers.style.width = (this.zoomValue * 80) + "px"; if (this.timeMarkerHolder) { this.time_markers.removeChild(this.timeMarkerHolder); } -- cgit v1.2.3