diff options
Diffstat (limited to 'js/components/layout/tools-list.reel')
-rwxr-xr-x | js/components/layout/tools-list.reel/tools-list.html | 33 | ||||
-rwxr-xr-x | js/components/layout/tools-list.reel/tools-list.js | 4 |
2 files changed, 17 insertions, 20 deletions
diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html index 3e49a4f3..5996e446 100755 --- a/js/components/layout/tools-list.reel/tools-list.html +++ b/js/components/layout/tools-list.reel/tools-list.html | |||
@@ -136,6 +136,21 @@ | |||
136 | "name": "ZoomTool" | 136 | "name": "ZoomTool" |
137 | }, | 137 | }, |
138 | 138 | ||
139 | "disable": { | ||
140 | "module": "montage/ui/condition.reel", | ||
141 | "name": "Condition", | ||
142 | "properties": { | ||
143 | "element": {"#": "disabledCondition"} | ||
144 | }, | ||
145 | "bindings": { | ||
146 | "condition": { | ||
147 | "boundObject": {"@": "owner"}, | ||
148 | "boundObjectPropertyPath": "disabled", | ||
149 | "oneway": true | ||
150 | } | ||
151 | } | ||
152 | }, | ||
153 | |||
139 | "owner": { | 154 | "owner": { |
140 | "module": "js/components/layout/tools-list.reel", | 155 | "module": "js/components/layout/tools-list.reel", |
141 | "name": "ToolsList", | 156 | "name": "ToolsList", |
@@ -165,25 +180,7 @@ | |||
165 | {"@": "repetition1"} | 180 | {"@": "repetition1"} |
166 | ] | 181 | ] |
167 | } | 182 | } |
168 | }, | ||
169 | |||
170 | "disabledCondition": { | ||
171 | "module": "montage/ui/condition.reel", | ||
172 | "name": "Condition", | ||
173 | "properties": { | ||
174 | "element": {"#": "disabledCondition"} | ||
175 | }, | ||
176 | "bindings": { | ||
177 | "condition": { | ||
178 | "boundObject": {"@": "owner"}, | ||
179 | "boundObjectPropertyPath": "disabled", | ||
180 | "oneway": true | ||
181 | } | ||
182 | } | ||
183 | } | 183 | } |
184 | |||
185 | |||
186 | |||
187 | } | 184 | } |
188 | </script> | 185 | </script> |
189 | 186 | ||
diff --git a/js/components/layout/tools-list.reel/tools-list.js b/js/components/layout/tools-list.reel/tools-list.js index b44f63b3..5ea6f70f 100755 --- a/js/components/layout/tools-list.reel/tools-list.js +++ b/js/components/layout/tools-list.reel/tools-list.js | |||
@@ -31,7 +31,7 @@ exports.ToolsList = Montage.create(Component, { | |||
31 | ZoomTool: { value: null }, | 31 | ZoomTool: { value: null }, |
32 | disabled: { value: true}, | 32 | disabled: { value: true}, |
33 | 33 | ||
34 | handleOnOpenDocument: { | 34 | handleOpenDocument: { |
35 | value: function(){ | 35 | value: function(){ |
36 | this.disabled = false; | 36 | this.disabled = false; |
37 | } | 37 | } |
@@ -48,7 +48,7 @@ exports.ToolsList = Montage.create(Component, { | |||
48 | prepareForDraw: { | 48 | prepareForDraw: { |
49 | enumerable: false, | 49 | enumerable: false, |
50 | value: function() { | 50 | value: function() { |
51 | this.eventManager.addEventListener( "onOpenDocument", this, false); | 51 | this.eventManager.addEventListener( "openDocument", this, false); |
52 | this.eventManager.addEventListener( "closeDocument", this, false); | 52 | this.eventManager.addEventListener( "closeDocument", this, false); |
53 | this.PenTool.options = this.application.ninja.toolsProperties.shapeProperties.lineProperties;//this.application.Ninja.toolsProperties.penProperties; | 53 | this.PenTool.options = this.application.ninja.toolsProperties.shapeProperties.lineProperties;//this.application.Ninja.toolsProperties.penProperties; |
54 | 54 | ||