diff options
Diffstat (limited to 'js/ninja.reel')
-rwxr-xr-x | js/ninja.reel/ninja.js | 17 |
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; |