From 49233086e159137bf6d6b0ee73947475b0d08092 Mon Sep 17 00:00:00 2001 From: Kruti Shah Date: Tue, 17 Jul 2012 17:29:26 -0700 Subject: Multi Doc Zoom Slider Handling Signed-off-by: Kruti Shah --- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 61 ++++++++++++++++++++-- .../TimelinePanel.reel/scss/TimelinePanel.scss | 2 +- .../Timeline/TimelineTrack.reel/TimelineTrack.js | 44 +--------------- 3 files changed, 59 insertions(+), 48 deletions(-) (limited to 'js/panels/Timeline') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index c048bcb2..6cc08cdf 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -922,6 +922,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.currentDocument.model.domContainer; this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; + + for (i = 0; i < hashLength; i++ ) { if (this.application.ninja.currentDocument.tlBreadcrumbHash[i].containerUuid === this.currentDocument.model.domContainer.uuid) { this.application.ninja.currentDocument.tlBreadcrumbHash[i].arrLayers = this.arrLayers; @@ -961,7 +963,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { value: function(boolUnbind) { var arrEvents = ["elementAdded", "elementsRemoved", - "selectionChange"], + "selectionChange", + "tlZoomSlider"], i, arrEventsLength = arrEvents.length; @@ -1112,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; - + + // Are we only showing animated layers? if (this.application.ninja.currentDocument.boolShowOnlyAnimated) { // Fake a click. @@ -1153,8 +1157,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this._captureSelection = false; this._openDoc = false; this.end_hottext.value = 25; + this.millisecondsOffset = 1000; + this.handleTrackContainerWidthChange(); - // Clear the repetitions if (this.arrLayers.length > 0) { this.arrLayers = []; @@ -1711,6 +1716,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this.time_markers.removeChild(this.timeMarkerHolder); } this.drawTimeMarkers(); + + } }, @@ -2247,7 +2254,53 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { } return false; } - } + }, + + handleTlZoomSlider: { + value: function(event) { + + var currentMilliSecPerPixel , currentMilliSec , clickPos; + var i = 0,j=0,tweensLength, + trackLength = this.trackRepetition.childComponents.length; + + for(j=0;j