aboutsummaryrefslogtreecommitdiff
path: root/js/ninja.reel/ninja.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-18 00:21:56 -0700
committerValerio Virgillito2012-05-18 00:21:56 -0700
commit7a94696e19b14e15261df516e2ba75e693b1313d (patch)
treeccb3cdff79be3ae5221779787bfbdcc5ca3d8e77 /js/ninja.reel/ninja.js
parentf227015e14b505dbd3fc4b030ca17cb6c50c5d88 (diff)
downloadninja-7a94696e19b14e15261df516e2ba75e693b1313d.tar.gz
enabling basic document switching
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/ninja.reel/ninja.js')
-rwxr-xr-xjs/ninja.reel/ninja.js17
1 files changed, 14 insertions, 3 deletions
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index 9f0456ae..ba87e2d5 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -161,9 +161,10 @@ exports.Ninja = Montage.create(Component, {
161 161
162 window.addEventListener("resize", this, false); 162 window.addEventListener("resize", this, false);
163 163
164 this.eventManager.addEventListener( "selectTool", this, false); 164 this.eventManager.addEventListener("selectTool", this, false);
165 this.eventManager.addEventListener( "selectSubTool", this, false); 165 this.eventManager.addEventListener("selectSubTool", this, false);
166 this.eventManager.addEventListener( "onOpenDocument", this, false); 166 this.eventManager.addEventListener("onOpenDocument", this, false);
167 this.eventManager.addEventListener("switchDocument", this, false);
167 168
168 this.addPropertyChangeListener("appModel.livePreview", this.executeLivePreview, false); 169 this.addPropertyChangeListener("appModel.livePreview", this.executeLivePreview, false);
169 this.addPropertyChangeListener("appModel.chromePreview", this.executeChromePreview, false); 170 this.addPropertyChangeListener("appModel.chromePreview", this.executeChromePreview, false);
@@ -279,6 +280,16 @@ exports.Ninja = Montage.create(Component, {
279 } 280 }
280 }, 281 },
281 282
283 handleSwitchDocument: {
284 value: function() {
285 this.currentDocument = this.documentController.activeDocument;
286
287 if(this.currentDocument.documentRoot) {
288 this.application.ninja.currentSelectedContainer = this.currentDocument.documentRoot;
289 }
290 }
291 },
292
282 executeLivePreview: { 293 executeLivePreview: {
283 value: function() { 294 value: function() {
284 var background, overflow, transitionStopRule; 295 var background, overflow, transitionStopRule;