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 2143dafd..9519730e 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
@@ -246,11 +250,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
246 clearTimelinePanel : { 250 clearTimelinePanel : {
247 value: function() { 251 value: function() {
248 console.log('clearing timeline...') 252 console.log('clearing timeline...')
249 this.arrTracks = null; 253 // update playhead position and time text
250 this.arrLayers = null; 254 this.application.ninja.timeline.playhead.style.left = "-2px";
255 this.application.ninja.timeline.playheadmarker.style.left = "0px";
256 this.application.ninja.timeline.updateTimeText(0.00);
257 this.timebar.style.width = "0px";
258
259 this.arrTracks = [];
260 this.arrLayers = [];
251 this.currentLayerNumber = 0; 261 this.currentLayerNumber = 0;
252 this.currentLayerSelected = null; 262 this.currentLayerSelected = false;
253 this.currentTrackSelected = null; 263 this.currentTrackSelected = false;
254 this.selectedKeyframes = []; 264 this.selectedKeyframes = [];
255 this.selectedTweens = []; 265 this.selectedTweens = [];
256 this._captureSelection = false; 266 this._captureSelection = false;