diff options
Diffstat (limited to 'js/controllers/document-controller.js')
-rwxr-xr-x | js/controllers/document-controller.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index eecf9146..2c34eedf 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -377,10 +377,10 @@ exports.DocumentController = Montage.create(Component, { | |||
377 | 377 | ||
378 | if(this._documents.length > 0) { | 378 | if(this._documents.length > 0) { |
379 | previousFocusedDocument = this._documents[this._documents.length - 1]; | 379 | previousFocusedDocument = this._documents[this._documents.length - 1]; |
380 | this._activeDocument = previousFocusedDocument; | 380 | this.activeDocument = previousFocusedDocument; |
381 | this.switchDocuments(this.activeDocument, previousFocusedDocument, true); | 381 | this.switchDocuments(this.activeDocument, previousFocusedDocument, false); |
382 | } else { | 382 | } else { |
383 | this._activeDocument = null; | 383 | this.activeDocument = null; |
384 | this.application.ninja.stage.hideRulers(); | 384 | this.application.ninja.stage.hideRulers(); |
385 | 385 | ||
386 | this.application.ninja.stage.hideCanvas(true); | 386 | this.application.ninja.stage.hideCanvas(true); |
@@ -502,14 +502,16 @@ exports.DocumentController = Montage.create(Component, { | |||
502 | this.application.ninja.stage.restoreAllPanels(); | 502 | this.application.ninja.stage.restoreAllPanels(); |
503 | this.application.ninja.stage.hideCanvas(false); | 503 | this.application.ninja.stage.hideCanvas(false); |
504 | this.application.ninja.stage.showRulers(); | 504 | this.application.ninja.stage.showRulers(); |
505 | } else if(currentDocument.currentView === "design" && newDocument.currentView === "code") { | ||
506 | this.application.ninja.stage.showCodeViewBar(true); | ||
507 | this.application.ninja.stage.collapseAllPanels(); | ||
508 | this.application.ninja.stage.hideCanvas(true); | ||
509 | this.application.ninja.stage.hideRulers(); | ||
510 | } | 505 | } |
511 | } | 506 | } |
512 | 507 | ||
508 | if(newDocument.currentView === "code") { | ||
509 | this.application.ninja.stage.showCodeViewBar(true); | ||
510 | this.application.ninja.stage.collapseAllPanels(); | ||
511 | this.application.ninja.stage.hideCanvas(true); | ||
512 | this.application.ninja.stage.hideRulers(); | ||
513 | } | ||
514 | |||
513 | this.application.ninja.stage.clearAllCanvas(); | 515 | this.application.ninja.stage.clearAllCanvas(); |
514 | 516 | ||
515 | if(didCreate) { | 517 | if(didCreate) { |