aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Reid2012-06-21 12:14:59 -0700
committerJon Reid2012-06-21 12:14:59 -0700
commit403d0834a23760c2481be050a8be925c1ba64a1b (patch)
tree9dafe6bf82365282c5e0dc2eb59b4a36a0446365
parentaabd9b98341308cd0d276e6e788b7a3f9531c394 (diff)
downloadninja-403d0834a23760c2481be050a8be925c1ba64a1b.tar.gz
Timeline: Bug fix IKNINJA-1783, Timeline panel is disabled when CSS file is
open in another tab.
-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');