diff options
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index b12183f2..dfc40c0a 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -217,9 +217,10 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
217 | prepareForDraw:{ | 217 | prepareForDraw:{ |
218 | value:function () { | 218 | value:function () { |
219 | this.initTimeline(); | 219 | this.initTimeline(); |
220 | this.eventManager.addEventListener("onOpenDocument", this, false); | 220 | // Bind the event handler for the document change events |
221 | this.eventManager.addEventListener("closeDocument", this, false); | 221 | this.eventManager.addEventListener("onOpenDocument", this.handleDocumentChange.bind(this), false); |
222 | this.eventManager.addEventListener("switchDocument", this, false); | 222 | this.eventManager.addEventListener("closeDocument", this.handleDocumentChange.bind(this), false); |
223 | this.eventManager.addEventListener("switchDocument", this.handleDocumentChange.bind(this), false); | ||
223 | } | 224 | } |
224 | }, | 225 | }, |
225 | 226 | ||
@@ -365,7 +366,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
365 | } | 366 | } |
366 | }, | 367 | }, |
367 | 368 | ||
368 | handleOnOpenDocument:{ | 369 | handleDocumentChange:{ |
369 | value:function(){ | 370 | value:function(){ |
370 | this._boolCacheArrays = false; | 371 | this._boolCacheArrays = false; |
371 | this.clearTimelinePanel(); | 372 | this.clearTimelinePanel(); |
@@ -377,19 +378,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
377 | this.initTimelineForDocument(); | 378 | this.initTimelineForDocument(); |
378 | } | 379 | } |
379 | }, | 380 | }, |
380 | |||
381 | handleCloseDocument: { | ||
382 | value: function(event) { | ||
383 | this.clearTimelinePanel(); | ||
384 | } | ||
385 | }, | ||
386 | |||
387 | handleSwitchDocument : { | ||
388 | value: function(event) { | ||
389 | // Handle document change. | ||
390 | this.handleOnOpenDocument(); | ||
391 | } | ||
392 | }, | ||
393 | 381 | ||
394 | updateTrackContainerWidth:{ | 382 | updateTrackContainerWidth:{ |
395 | value: function(){ | 383 | value: function(){ |