diff options
author | Pushkar Joshi | 2012-03-13 11:24:35 -0700 |
---|---|---|
committer | Pushkar Joshi | 2012-03-13 11:24:35 -0700 |
commit | 4ad1650f629e7e345eade52ed6dadc233b27cc45 (patch) | |
tree | 0e7b925f4dedf27f2684915e7e247e79c4a74aff /js/components/layout/tools-properties.reel | |
parent | 730c42e005b1ebd96448e3bc2dd700ffd8909cb5 (diff) | |
parent | 9f3307810541ca6f95d7ca6d1febe8afdcd2c101 (diff) | |
download | ninja-4ad1650f629e7e345eade52ed6dadc233b27cc45.tar.gz |
Merge branch 'master' into pentool
Diffstat (limited to 'js/components/layout/tools-properties.reel')
-rwxr-xr-x | js/components/layout/tools-properties.reel/tools-properties.html | 16 | ||||
-rwxr-xr-x | js/components/layout/tools-properties.reel/tools-properties.js | 21 |
2 files changed, 36 insertions, 1 deletions
diff --git a/js/components/layout/tools-properties.reel/tools-properties.html b/js/components/layout/tools-properties.reel/tools-properties.html index 49f2d776..3c7a92fa 100755 --- a/js/components/layout/tools-properties.reel/tools-properties.html +++ b/js/components/layout/tools-properties.reel/tools-properties.html | |||
@@ -136,6 +136,21 @@ | |||
136 | "element": {"#": "zoomProperties"} | 136 | "element": {"#": "zoomProperties"} |
137 | } | 137 | } |
138 | }, | 138 | }, |
139 | |||
140 | "disable": { | ||
141 | "module": "montage/ui/condition.reel", | ||
142 | "name": "Condition", | ||
143 | "properties": { | ||
144 | "element": {"#": "disabledCondition"} | ||
145 | }, | ||
146 | "bindings": { | ||
147 | "condition": { | ||
148 | "boundObject": {"@": "owner"}, | ||
149 | "boundObjectPropertyPath": "disabled", | ||
150 | "oneway": true | ||
151 | } | ||
152 | } | ||
153 | }, | ||
139 | 154 | ||
140 | "owner": { | 155 | "owner": { |
141 | "module": "js/components/layout/tools-properties.reel", | 156 | "module": "js/components/layout/tools-properties.reel", |
@@ -191,6 +206,7 @@ | |||
191 | <div id="rotateStageProperties"></div> | 206 | <div id="rotateStageProperties"></div> |
192 | <div id="panProperties"></div> | 207 | <div id="panProperties"></div> |
193 | <div id="zoomProperties"></div> | 208 | <div id="zoomProperties"></div> |
209 | <div id="disabledCondition" class="panelDisabled"></div> | ||
194 | </div> | 210 | </div> |
195 | </body> | 211 | </body> |
196 | </html> | 212 | </html> |
diff --git a/js/components/layout/tools-properties.reel/tools-properties.js b/js/components/layout/tools-properties.reel/tools-properties.js index 104aabb7..47945b58 100755 --- a/js/components/layout/tools-properties.reel/tools-properties.js +++ b/js/components/layout/tools-properties.reel/tools-properties.js | |||
@@ -9,10 +9,29 @@ var Component = require("montage/ui/component").Component; | |||
9 | 9 | ||
10 | exports.ToolsProperties = Montage.create(Component, { | 10 | exports.ToolsProperties = Montage.create(Component, { |
11 | 11 | ||
12 | disabled: { | ||
13 | value: true | ||
14 | }, | ||
15 | |||
16 | handleCloseDocument: { | ||
17 | value: function(){ | ||
18 | if(!this.application.ninja.documentController.activeDocument) { | ||
19 | this.disabled = true; | ||
20 | } | ||
21 | } | ||
22 | }, | ||
23 | |||
24 | handleOpenDocument: { | ||
25 | value: function() { | ||
26 | this.disabled = false; | ||
27 | } | ||
28 | }, | ||
29 | |||
12 | prepareForDraw: { | 30 | prepareForDraw: { |
13 | enumerable: false, | 31 | enumerable: false, |
14 | value: function() { | 32 | value: function() { |
15 | //this.selectedTool = this.application.toolsData.selectedTool; | 33 | this.eventManager.addEventListener( "openDocument", this, false); |
34 | this.eventManager.addEventListener( "closeDocument", this, false); | ||
16 | } | 35 | } |
17 | }, | 36 | }, |
18 | 37 | ||