aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-18 01:36:05 -0700
committerValerio Virgillito2012-05-18 01:36:05 -0700
commit24d1873302b2fffc25d254e15e8aa36f59eedb88 (patch)
tree29658da7910ff5bd5709ccebd758a9d46ee2ff4f /js/controllers
parente9dddef38507cafcf5702ce6a512b4005609acef (diff)
downloadninja-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-xjs/controllers/document-controller.js4
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 },