diff options
Diffstat (limited to 'js/controllers/document-controller.js')
-rwxr-xr-x | js/controllers/document-controller.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 3e15511d..aa037bd4 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -399,10 +399,10 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
399 | 399 | ||
400 | if(this._documents.length > 0) { | 400 | if(this._documents.length > 0) { |
401 | previousFocusedDocument = this._documents[this._documents.length - 1]; | 401 | previousFocusedDocument = this._documents[this._documents.length - 1]; |
402 | this._activeDocument = previousFocusedDocument; | 402 | this.activeDocument = previousFocusedDocument; |
403 | this.switchDocuments(this.activeDocument, previousFocusedDocument, true); | 403 | this.switchDocuments(this.activeDocument, previousFocusedDocument, false); |
404 | } else { | 404 | } else { |
405 | this._activeDocument = null; | 405 | this.activeDocument = null; |
406 | this.application.ninja.stage.hideRulers(); | 406 | this.application.ninja.stage.hideRulers(); |
407 | 407 | ||
408 | this.application.ninja.stage.hideCanvas(true); | 408 | this.application.ninja.stage.hideCanvas(true); |
@@ -524,13 +524,10 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
524 | this.application.ninja.stage.restoreAllPanels(); | 524 | this.application.ninja.stage.restoreAllPanels(); |
525 | this.application.ninja.stage.hideCanvas(false); | 525 | this.application.ninja.stage.hideCanvas(false); |
526 | this.application.ninja.stage.showRulers(); | 526 | this.application.ninja.stage.showRulers(); |
527 | } else if(currentDocument.currentView === "design" && 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(); | ||
532 | } | 527 | } |
533 | }else if(!currentDocument && newDocument.currentView === "code"){ | 528 | } |
529 | |||
530 | if(newDocument.currentView === "code") { | ||
534 | this.application.ninja.stage.showCodeViewBar(true); | 531 | this.application.ninja.stage.showCodeViewBar(true); |
535 | this.application.ninja.stage.collapseAllPanels(); | 532 | this.application.ninja.stage.collapseAllPanels(); |
536 | this.application.ninja.stage.hideCanvas(true); | 533 | this.application.ninja.stage.hideCanvas(true); |