diff options
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html | 5 | ||||
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 18 |
2 files changed, 17 insertions, 6 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html index 92adee05..1aa9a725 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html | |||
@@ -32,7 +32,8 @@ | |||
32 | "timetext" : {"#": "time_text"}, | 32 | "timetext" : {"#": "time_text"}, |
33 | "timebar" : {"#": "time_bar"}, | 33 | "timebar" : {"#": "time_bar"}, |
34 | "container_tracks" : {"#" : "container-tracks"}, | 34 | "container_tracks" : {"#" : "container-tracks"}, |
35 | "end_hottext" : {"@" : "endHottext"} | 35 | "end_hottext" : {"@" : "endHottext"}, |
36 | "getme" : {"#" : "getme"} | ||
36 | } | 37 | } |
37 | }, | 38 | }, |
38 | 39 | ||
@@ -284,7 +285,7 @@ | |||
284 | 285 | ||
285 | <div id="user_layers" class="userlayers"> | 286 | <div id="user_layers" class="userlayers"> |
286 | <div id="master_layer" class="masterlayer"> | 287 | <div id="master_layer" class="masterlayer"> |
287 | <div>Master Layer</div> | 288 | <div id="getme">Master Layer</div> |
288 | </div> | 289 | </div> |
289 | <div id="container-layers"> | 290 | <div id="container-layers"> |
290 | <div id="container-layer"></div> | 291 | <div id="container-layer"></div> |
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; |