diff options
author | Valerio Virgillito | 2012-05-18 01:36:05 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-18 01:36:05 -0700 |
commit | 24d1873302b2fffc25d254e15e8aa36f59eedb88 (patch) | |
tree | 29658da7910ff5bd5709ccebd758a9d46ee2ff4f /js/controllers | |
parent | e9dddef38507cafcf5702ce6a512b4005609acef (diff) | |
download | ninja-24d1873302b2fffc25d254e15e8aa36f59eedb88.tar.gz |
fixed a switch documents bug where the layout was getting called before setting the container.
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/document-controller.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index ea4022b8..f1523d87 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -492,6 +492,8 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
492 | currentDocument.model.views.design.hide(); | 492 | currentDocument.model.views.design.hide(); |
493 | } | 493 | } |
494 | 494 | ||
495 | this.application.ninja.stage.clearAllCanvas(); | ||
496 | |||
495 | if(didCreate) { | 497 | if(didCreate) { |
496 | newDocument.model.views.design.iframe.style.opacity = 1; | 498 | newDocument.model.views.design.iframe.style.opacity = 1; |
497 | NJevent("onOpenDocument", newDocument); | 499 | NJevent("onOpenDocument", newDocument); |
@@ -499,7 +501,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
499 | this.activeDocument = newDocument; | 501 | this.activeDocument = newDocument; |
500 | newDocument.model.views.design.show(); | 502 | newDocument.model.views.design.show(); |
501 | newDocument.deserializeDocument(); | 503 | newDocument.deserializeDocument(); |
502 | NJevent("switchDocument"); | 504 | NJevent("onSwitchDocument"); |
503 | } | 505 | } |
504 | } | 506 | } |
505 | }, | 507 | }, |