diff options
Diffstat (limited to 'js')
-rwxr-xr-x | js/controllers/document-controller.js | 5 | ||||
-rwxr-xr-x | js/helper-classes/3D/view-utils.js | 4 | ||||
-rwxr-xr-x | js/mediators/keyboard-mediator.js | 2 | ||||
-rwxr-xr-x | js/panels/Splitter.js | 7 |
4 files changed, 13 insertions, 5 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 7758f346..afddaa19 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -524,6 +524,11 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
524 | this.application.ninja.stage.hideCanvas(true); | 524 | this.application.ninja.stage.hideCanvas(true); |
525 | this.application.ninja.stage.hideRulers(); | 525 | this.application.ninja.stage.hideRulers(); |
526 | } | 526 | } |
527 | }else if(!currentDocument && newDocument.currentView === "code"){ | ||
528 | this.application.ninja.stage.showCodeViewBar(true); | ||
529 | this.application.ninja.stage.collapseAllPanels(); | ||
530 | this.application.ninja.stage.hideCanvas(true); | ||
531 | this.application.ninja.stage.hideRulers(); | ||
527 | } | 532 | } |
528 | 533 | ||
529 | this.application.ninja.stage.clearAllCanvas(); | 534 | this.application.ninja.stage.clearAllCanvas(); |
diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js index 0080bf90..0a4fe0ac 100755 --- a/js/helper-classes/3D/view-utils.js +++ b/js/helper-classes/3D/view-utils.js | |||
@@ -1005,9 +1005,9 @@ exports.ViewUtils = Montage.create(Component, { | |||
1005 | this.popViewportObj(); | 1005 | this.popViewportObj(); |
1006 | 1006 | ||
1007 | if (elt === this.application.ninja.currentDocument.documentRoot) break; | 1007 | if (elt === this.application.ninja.currentDocument.documentRoot) break; |
1008 | if (elt === this.application.ninja.currentDocument.documentRoot.parentNode) break; | 1008 | if (this.application.ninja.currentDocument.documentRoot && elt === this.application.ninja.currentDocument.documentRoot.parentNode) break; |
1009 | elt = elt.offsetParent; | 1009 | elt = elt.offsetParent; |
1010 | if (elt === this.application.ninja.currentDocument.documentRoot.parentNode) break; | 1010 | if (this.application.ninja.currentDocument.documentRoot && elt === this.application.ninja.currentDocument.documentRoot.parentNode) break; |
1011 | } | 1011 | } |
1012 | 1012 | ||
1013 | return mat; | 1013 | return mat; |
diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js index 23a2ce75..2f55edb4 100755 --- a/js/mediators/keyboard-mediator.js +++ b/js/mediators/keyboard-mediator.js | |||
@@ -88,7 +88,7 @@ exports.KeyboardMediator = Montage.create(Component, { | |||
88 | 88 | ||
89 | //keyboard controls for html design view | 89 | //keyboard controls for html design view |
90 | // TODO - New template mode doesn't set currentView yet. | 90 | // TODO - New template mode doesn't set currentView yet. |
91 | if((!!this.application.ninja.currentDocument)){// && (this.application.ninja.currentDocument.model.currentView === "design")){ | 91 | if((!!this.application.ninja.currentDocument) && (this.application.ninja.currentDocument.model.currentView === "design")){ |
92 | 92 | ||
93 | // Don't do anything if an input or other control is focused | 93 | // Don't do anything if an input or other control is focused |
94 | if(document.activeElement.nodeName !== "BODY") { | 94 | if(document.activeElement.nodeName !== "BODY") { |
diff --git a/js/panels/Splitter.js b/js/panels/Splitter.js index 0640abb2..8675d314 100755 --- a/js/panels/Splitter.js +++ b/js/panels/Splitter.js | |||
@@ -111,8 +111,9 @@ exports.Splitter = Montage.create(Component, { | |||
111 | } else { | 111 | } else { |
112 | this.panel.removeEventListener("webkitTransitionEnd", this, false); | 112 | this.panel.removeEventListener("webkitTransitionEnd", this, false); |
113 | } | 113 | } |
114 | 114 | if(this.application.ninja.currentDocument.currentView === "design"){ | |
115 | this.application.ninja.stage.resizeCanvases = true; | 115 | this.application.ninja.stage.resizeCanvases = true; |
116 | } | ||
116 | } | 117 | } |
117 | }, | 118 | }, |
118 | 119 | ||
@@ -149,6 +150,7 @@ exports.Splitter = Montage.create(Component, { | |||
149 | this.panel.addEventListener("webkitTransitionEnd", this, false); | 150 | this.panel.addEventListener("webkitTransitionEnd", this, false); |
150 | } | 151 | } |
151 | this._collapsed = true; | 152 | this._collapsed = true; |
153 | this.disabled = true; | ||
152 | this.needsDraw = true; | 154 | this.needsDraw = true; |
153 | } | 155 | } |
154 | } | 156 | } |
@@ -169,6 +171,7 @@ exports.Splitter = Montage.create(Component, { | |||
169 | } else { | 171 | } else { |
170 | this.panel.addEventListener("webkitTransitionEnd", this, false); | 172 | this.panel.addEventListener("webkitTransitionEnd", this, false); |
171 | } | 173 | } |
174 | this.disabled = false; | ||
172 | this.needsDraw = true; | 175 | this.needsDraw = true; |
173 | } | 176 | } |
174 | } | 177 | } |