diff options
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 521c315d..7581d15a 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -527,7 +527,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
527 | set:function (newVal) { | 527 | set:function (newVal) { |
528 | if (newVal !== this._millisecondsOffset) { | 528 | if (newVal !== this._millisecondsOffset) { |
529 | 529 | ||
530 | this.tempValue = newVal; | 530 | this.zoomValue = newVal; |
531 | var tempValue = (1/newVal) * 1000000; | 531 | var tempValue = (1/newVal) * 1000000; |
532 | newVal = tempValue; | 532 | newVal = tempValue; |
533 | 533 | ||
@@ -1130,8 +1130,13 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1130 | this.currentLayersSelected = this.application.ninja.currentDocument.tlCurrentLayersSelected; | 1130 | this.currentLayersSelected = this.application.ninja.currentDocument.tlCurrentLayersSelected; |
1131 | this.currentElementsSelected = this.application.ninja.currentDocument.tlCurrentElementsSelected; | 1131 | this.currentElementsSelected = this.application.ninja.currentDocument.tlCurrentElementsSelected; |
1132 | this._currentDocumentUuid = this.application.ninja.currentDocument.uuid; | 1132 | this._currentDocumentUuid = this.application.ninja.currentDocument.uuid; |
1133 | 1133 | // if(this.application.ninja.currentDocument.tlZoomSliderValue){ | |
1134 | 1134 | // this.millisecondsOffset = this.application.ninja.currentDocument.tlZoomSliderValue ; | |
1135 | // if(this.zoom_slider){ | ||
1136 | // this.zoom_slider.value = this.application.ninja.currentDocument.tlZoomSliderValue; | ||
1137 | // } | ||
1138 | // | ||
1139 | // } | ||
1135 | // Are we only showing animated layers? | 1140 | // Are we only showing animated layers? |
1136 | if (this.application.ninja.currentDocument.boolShowOnlyAnimated) { | 1141 | if (this.application.ninja.currentDocument.boolShowOnlyAnimated) { |
1137 | // Fake a click. | 1142 | // Fake a click. |
@@ -1706,12 +1711,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1706 | zoomTrackContainerWidthChange:{ | 1711 | zoomTrackContainerWidthChange:{ |
1707 | value:function () { | 1712 | value:function () { |
1708 | 1713 | ||
1709 | this.tempValue = this.tempValue/1000; | 1714 | if(this.application.ninja.currentDocument && this.zoomValue){ |
1710 | this.tempValue *= 30; | 1715 | this.application.ninja.currentDocument.tlZoomSliderValue = this.zoomValue; |
1716 | |||
1717 | } | ||
1711 | 1718 | ||
1712 | this.container_tracks.style.width = (this.tempValue * 80) + "px"; | 1719 | this.zoomValue = this.zoomValue/1000; |
1713 | this.master_track.style.width = (this.tempValue * 80) + "px"; | 1720 | this.zoomValue *= 30; |
1714 | this.time_markers.style.width = (this.tempValue * 80) + "px"; | 1721 | |
1722 | this.container_tracks.style.width = (this.zoomValue * 80) + "px"; | ||
1723 | this.master_track.style.width = (this.zoomValue * 80) + "px"; | ||
1724 | this.time_markers.style.width = (this.zoomValue * 80) + "px"; | ||
1715 | if (this.timeMarkerHolder) { | 1725 | if (this.timeMarkerHolder) { |
1716 | this.time_markers.removeChild(this.timeMarkerHolder); | 1726 | this.time_markers.removeChild(this.timeMarkerHolder); |
1717 | } | 1727 | } |
@@ -1917,7 +1927,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1917 | 1927 | ||
1918 | handleElementsRemoved:{ | 1928 | handleElementsRemoved:{ |
1919 | value:function (event) { | 1929 | value:function (event) { |
1920 | this.deleteLayers(event.detail); | 1930 | |
1931 | if(typeof(event.detail.length) === "undefined"){ | ||
1932 | this.deleteLayers([event.detail]); | ||
1933 | }else{ | ||
1934 | this.deleteLayers(event.detail); | ||
1935 | } | ||
1921 | } | 1936 | } |
1922 | }, | 1937 | }, |
1923 | 1938 | ||