aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index b8ba5feb..1ba9f067 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -118,9 +118,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
118 return; 118 return;
119 } 119 }
120 120
121 if(!this._currentDocument && value.currentView === "design") { 121 // Should we enable the panel?
122 this.enablePanel(true); 122 if (typeof(this._currentDocument) !== "undefined") {
123 } 123 // We have a document, or at least we have initialized the panel.
124 // What view are we in?
125 if (typeof(value) !== "undefined") {
126 if (value.currentView === "design") {
127 // We are in design view, so enable the panel.
128 this.enablePanel(true);
129 }
130 }
131 }
124 132
125 this._currentDocument = value; 133 this._currentDocument = value;
126 134
@@ -893,7 +901,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
893 this.drawTimeMarkers(); 901 this.drawTimeMarkers();
894 // Document switching 902 // Document switching
895 // Check to see if we have saved timeline information in the currentDocument. 903 // Check to see if we have saved timeline information in the currentDocument.
896 //console.log("TimelinePanel.initTimelineForDocument"); 904 // console.log("TimelinePanel.initTimelineForDocument");
897 905
898 if ((typeof(this.application.ninja.currentDocument.isTimelineInitialized) === "undefined")) { 906 if ((typeof(this.application.ninja.currentDocument.isTimelineInitialized) === "undefined")) {
899 // console.log('TimelinePanel.initTimelineForDocument: new Document'); 907 // console.log('TimelinePanel.initTimelineForDocument: new Document');