aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html5
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js18
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 9d0b8210..65d2fa7b 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 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;