diff options
Diffstat (limited to 'js/ninja.reel/ninja.js')
-rwxr-xr-x | js/ninja.reel/ninja.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 88361fd9..5af9bcdf 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js | |||
@@ -12,6 +12,18 @@ var matrix = require("js/lib/math/matrix"); | |||
12 | 12 | ||
13 | exports.Ninja = Montage.create(Component, { | 13 | exports.Ninja = Montage.create(Component, { |
14 | 14 | ||
15 | disabled: { | ||
16 | value: true | ||
17 | }, | ||
18 | |||
19 | handleCloseDocument: { | ||
20 | value: function(){ | ||
21 | if(!this.application.ninja.documentController.activeDocument) { | ||
22 | this.disabled = true; | ||
23 | } | ||
24 | } | ||
25 | }, | ||
26 | |||
15 | ninjaVersion: { | 27 | ninjaVersion: { |
16 | value: null | 28 | value: null |
17 | }, | 29 | }, |
@@ -57,6 +69,7 @@ exports.Ninja = Montage.create(Component, { | |||
57 | this.eventManager.addEventListener( "selectTool", this, false); | 69 | this.eventManager.addEventListener( "selectTool", this, false); |
58 | this.eventManager.addEventListener( "selectSubTool", this, false); | 70 | this.eventManager.addEventListener( "selectSubTool", this, false); |
59 | this.eventManager.addEventListener( "onOpenDocument", this, false); | 71 | this.eventManager.addEventListener( "onOpenDocument", this, false); |
72 | this.eventManager.addEventListener( "closeDocument", this, false); | ||
60 | 73 | ||
61 | this.addEventListener("change@appModel.livePreview", this.executeLivePreview, false); | 74 | this.addEventListener("change@appModel.livePreview", this.executeLivePreview, false); |
62 | this.addEventListener("change@appModel.chromePreview", this.executeChromePreview, false); | 75 | this.addEventListener("change@appModel.chromePreview", this.executeChromePreview, false); |
@@ -143,7 +156,7 @@ exports.Ninja = Montage.create(Component, { | |||
143 | this.currentDocument = event.detail; | 156 | this.currentDocument = event.detail; |
144 | 157 | ||
145 | this.appModel.show3dGrid = this.currentDocument.draw3DGrid; | 158 | this.appModel.show3dGrid = this.currentDocument.draw3DGrid; |
146 | 159 | this.disabled = false; | |
147 | NJevent("openDocument"); | 160 | NJevent("openDocument"); |
148 | } | 161 | } |
149 | }, | 162 | }, |