diff options
-rwxr-xr-x | js/controllers/document-controller.js | 3 | ||||
-rwxr-xr-x | js/document/document-html.js | 2 | ||||
-rwxr-xr-x | js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index e059e7e1..13ab33cc 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -53,10 +53,9 @@ exports.DocumentController = Montage.create(Component, { | |||
53 | document.getElementById("iframeContainer").style.display = "block"; | 53 | document.getElementById("iframeContainer").style.display = "block"; |
54 | document.getElementById("codeViewContainer").style.display = "block"; | 54 | document.getElementById("codeViewContainer").style.display = "block"; |
55 | } else if(this._currentDocument.currentView === "design") { | 55 | } else if(this._currentDocument.currentView === "design") { |
56 | this._currentDocument.model.currentView.show(); | 56 | |
57 | } else { | 57 | } else { |
58 | document.getElementById("iframeContainer").style.display = "none"; | 58 | document.getElementById("iframeContainer").style.display = "none"; |
59 | this._currentDocument.model.currentView.show(); | ||
60 | } | 59 | } |
61 | 60 | ||
62 | } | 61 | } |
diff --git a/js/document/document-html.js b/js/document/document-html.js index c60a12a2..377c305a 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -99,6 +99,8 @@ exports.HtmlDocument = Montage.create(Component, { | |||
99 | //Removing observer, only needed on initial load | 99 | //Removing observer, only needed on initial load |
100 | this._observer.disconnect(); | 100 | this._observer.disconnect(); |
101 | this._observer = null; | 101 | this._observer = null; |
102 | //Show the view | ||
103 | this.model.currentView.show(); | ||
102 | //Making callback after view is loaded | 104 | //Making callback after view is loaded |
103 | this.loaded.callback.call(this.loaded.context, this); | 105 | this.loaded.callback.call(this.loaded.context, this); |
104 | } | 106 | } |
diff --git a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js index 49907c9d..104d474d 100755 --- a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js +++ b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js | |||
@@ -213,7 +213,7 @@ exports.ThreeD = Montage.create(Component, { | |||
213 | 213 | ||
214 | this._currentDocument = value; | 214 | this._currentDocument = value; |
215 | 215 | ||
216 | if(this._currentDocument.currentView === "design") { | 216 | if(this._currentDocument && this._currentDocument.currentView === "design") { |
217 | // Save a reference of the pi inside the document view to be able to clear | 217 | // Save a reference of the pi inside the document view to be able to clear |
218 | Object.defineBinding(this, "item", { | 218 | Object.defineBinding(this, "item", { |
219 | boundObject: this, | 219 | boundObject: this, |