aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js18
1 files changed, 14 insertions, 4 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index d7d5328e..d7ce7079 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -172,6 +172,10 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
172 prepareForDraw:{ 172 prepareForDraw:{
173 value:function () { 173 value:function () {
174 this.eventManager.addEventListener( "onOpenDocument", this, false); 174 this.eventManager.addEventListener( "onOpenDocument", this, false);
175 var that = this;
176 this.getme.addEventListener("click", function() {
177 that.clearTimelinePanel();
178 }, false)
175 } 179 }
176 }, 180 },
177 181
@@ -250,11 +254,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
250 clearTimelinePanel : { 254 clearTimelinePanel : {
251 value: function() { 255 value: function() {
252 console.log('clearing timeline...') 256 console.log('clearing timeline...')
253 this.arrTracks = null; 257 // update playhead position and time text
254 this.arrLayers = null; 258 this.application.ninja.timeline.playhead.style.left = "-2px";
259 this.application.ninja.timeline.playheadmarker.style.left = "0px";
260 this.application.ninja.timeline.updateTimeText(0.00);
261 this.timebar.style.width = "0px";
262
263 this.arrTracks = [];
264 this.arrLayers = [];
255 this.currentLayerNumber = 0; 265 this.currentLayerNumber = 0;
256 this.currentLayerSelected = null; 266 this.currentLayerSelected = false;
257 this.currentTrackSelected = null; 267 this.currentTrackSelected = false;
258 this.selectedKeyframes = []; 268 this.selectedKeyframes = [];
259 this.selectedTweens = []; 269 this.selectedTweens = [];
260 this._captureSelection = false; 270 this._captureSelection = false;