diff options
Diffstat (limited to 'js/components/ui/property-control.reel/property-control.js')
-rwxr-xr-x | js/components/ui/property-control.reel/property-control.js | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/js/components/ui/property-control.reel/property-control.js b/js/components/ui/property-control.reel/property-control.js index 6e0a3916..49ee7334 100755 --- a/js/components/ui/property-control.reel/property-control.js +++ b/js/components/ui/property-control.reel/property-control.js | |||
@@ -39,7 +39,8 @@ var Montage = require("montage/core/core").Montage, | |||
39 | TextField = require("js/components/TextField.reel").TextField, | 39 | TextField = require("js/components/TextField.reel").TextField, |
40 | ColorChip = require("js/components/ui/color-chip.reel").ColorChip, | 40 | ColorChip = require("js/components/ui/color-chip.reel").ColorChip, |
41 | FileInput = require("js/components/ui/file-input.reel").FileInput, | 41 | FileInput = require("js/components/ui/file-input.reel").FileInput, |
42 | InputGroup = require("js/components/ui/input-group.reel").InputGroup; | 42 | InputGroup = require("js/components/ui/input-group.reel").InputGroup, |
43 | GradientPicker = require("js/components/gradientpicker.reel").GradientPicker; | ||
43 | 44 | ||
44 | var PropertyControl = exports.PropertyControl = Montage.create(Component, { | 45 | var PropertyControl = exports.PropertyControl = Montage.create(Component, { |
45 | 46 | ||
@@ -169,15 +170,15 @@ var PropertyControl = exports.PropertyControl = Montage.create(Component, { | |||
169 | }, | 170 | }, |
170 | 171 | ||
171 | handleEvent: | 172 | handleEvent: |
172 | { | 173 | { |
173 | value:function(event) | 174 | value:function(event) |
174 | { | 175 | { |
175 | if(event.wasSetByCode) { | 176 | if(event.wasSetByCode) { |
176 | return; | 177 | return; |
177 | } | 178 | } |
178 | this._dispatchPropEvent(event); | 179 | this._dispatchPropEvent(event); |
179 | } | 180 | } |
180 | }, | 181 | }, |
181 | 182 | ||
182 | _dispatchPropEvent: { | 183 | _dispatchPropEvent: { |
183 | value: function(event) { | 184 | value: function(event) { |
@@ -195,7 +196,7 @@ var PropertyControl = exports.PropertyControl = Montage.create(Component, { | |||
195 | propEvent.propertyLabel = this.label; | 196 | propEvent.propertyLabel = this.label; |
196 | propEvent.propertyValue = event.currentTarget[this._prop]; | 197 | propEvent.propertyValue = event.currentTarget[this._prop]; |
197 | propEvent.propertyEvent = event; | 198 | propEvent.propertyEvent = event; |
198 | 199 | ||
199 | this.dispatchEvent(propEvent); | 200 | this.dispatchEvent(propEvent); |
200 | } | 201 | } |
201 | }, | 202 | }, |
@@ -261,6 +262,11 @@ var PropertyControl = exports.PropertyControl = Montage.create(Component, { | |||
261 | this._control.addEventListener("changing", this, false); | 262 | this._control.addEventListener("changing", this, false); |
262 | this._prop = "value"; | 263 | this._prop = "value"; |
263 | break; | 264 | break; |
265 | case "GradientPicker": | ||
266 | this._control = GradientPicker.create(); | ||
267 | this._control.addEventListener("change", this, false); | ||
268 | this._prop = "value"; | ||
269 | break; | ||
264 | default: | 270 | default: |
265 | break; | 271 | break; |
266 | } | 272 | } |