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.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 8ae801fc..e1f0a21c 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -335,6 +335,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
335 this.playhead.addEventListener("mousedown", this.startPlayheadTracking.bind(this), false); 335 this.playhead.addEventListener("mousedown", this.startPlayheadTracking.bind(this), false);
336 this.playhead.addEventListener("mouseup", this.stopPlayheadTracking.bind(this), false); 336 this.playhead.addEventListener("mouseup", this.stopPlayheadTracking.bind(this), false);
337 this.time_markers.addEventListener("click", this.updatePlayhead.bind(this), false); 337 this.time_markers.addEventListener("click", this.updatePlayhead.bind(this), false);
338 this.enablePanel(false);
338 } 339 }
339 }, 340 },
340 341
@@ -437,7 +438,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
437 this.deselectTweens(); 438 this.deselectTweens();
438 439
439 // Reset visual appearance 440 // Reset visual appearance
440 // Todo: Maybe this should be stored per document? 441 // Todo: Maybe this should be stored per document, so we can persist between document switch?
441 this.application.ninja.timeline.playhead.style.left = "-2px"; 442 this.application.ninja.timeline.playhead.style.left = "-2px";
442 this.application.ninja.timeline.playheadmarker.style.left = "0px"; 443 this.application.ninja.timeline.playheadmarker.style.left = "0px";
443 this.application.ninja.timeline.updateTimeText(0.00); 444 this.application.ninja.timeline.updateTimeText(0.00);
@@ -475,7 +476,10 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
475 476
476 // Reinitialize the timeline...but only if there are open documents. 477 // Reinitialize the timeline...but only if there are open documents.
477 if (this.application.ninja.documentController._documents.length > 0) { 478 if (this.application.ninja.documentController._documents.length > 0) {
479 this.enablePanel(true);
478 this.initTimelineForDocument(); 480 this.initTimelineForDocument();
481 } else {
482 this.enablePanel(false);
479 } 483 }
480 } 484 }
481 }, 485 },
@@ -1159,6 +1163,15 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1159 return command; 1163 return command;
1160 } 1164 }
1161 }, 1165 },
1166 enablePanel : {
1167 value: function(boolEnable) {
1168 if (boolEnable) {
1169 this.timeline_disabler.style.display = "none";
1170 } else {
1171 this.timeline_disabler.style.display = "block";
1172 }
1173 }
1174 },
1162 /* === END: Controllers === */ 1175 /* === END: Controllers === */
1163 1176
1164 /* === BEGIN: Logging routines === */ 1177 /* === BEGIN: Logging routines === */