diff options
author | Valerio Virgillito | 2012-02-13 14:05:10 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-13 14:05:10 -0800 |
commit | 0d7d6d4d98437a93f31ededa14ca6eb5382c9e58 (patch) | |
tree | 95711517d51e2b100728df267f42390156685c52 /js/panels/properties/sections | |
parent | dcd147265ad0339448ea4466253b03b2899e0cea (diff) | |
download | ninja-0d7d6d4d98437a93f31ededa14ca6eb5382c9e58.tar.gz |
Cleaning up the stage background color chip.
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/panels/properties/sections')
-rw-r--r-- | js/panels/properties/sections/custom.reel/custom.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/js/panels/properties/sections/custom.reel/custom.js b/js/panels/properties/sections/custom.reel/custom.js index 5315defc..a2b9b9fa 100644 --- a/js/panels/properties/sections/custom.reel/custom.js +++ b/js/panels/properties/sections/custom.reel/custom.js | |||
@@ -105,13 +105,14 @@ exports.CustomSection = Montage.create(Component, { | |||
105 | } | 105 | } |
106 | }, | 106 | }, |
107 | 107 | ||
108 | /** | ||
109 | * Color change handler. Hard coding the stage for now since only the stage PI uses this color chip | ||
110 | */ | ||
108 | handleColorChange: { | 111 | handleColorChange: { |
109 | value: function(event) { | 112 | value: function(event) { |
110 | // Change the stage color for now | 113 | // Change the stage color for now |
111 | console.log(this); | 114 | //console.log(this, event); |
112 | console.log(event); | 115 | ElementsMediator.setProperty([this.application.ninja.currentDocument.documentRoot], this.id, [event._event.color.css], "Change", "pi", ''); |
113 | console.log(event._event.color.css); | ||
114 | ElementsMediator.setProperty([this.application.ninja.currentDocument.documentRoot], "background", [event._event.color.css], "Change", "pi", 'foo'); | ||
115 | /* | 116 | /* |
116 | var propEvent = document.createEvent("CustomEvent"); | 117 | var propEvent = document.createEvent("CustomEvent"); |
117 | propEvent.initEvent("propertyChange", true, true); | 118 | propEvent.initEvent("propertyChange", true, true); |
@@ -330,11 +331,15 @@ exports.CustomSection = Montage.create(Component, { | |||
330 | createColorChip: { | 331 | createColorChip: { |
331 | value: function(aField) { | 332 | value: function(aField) { |
332 | var obj = ColorChip.create(); | 333 | var obj = ColorChip.create(); |
334 | |||
333 | obj.chip = true; | 335 | obj.chip = true; |
334 | obj.iconType = "fillIcon"; | 336 | obj.iconType = "fillIcon"; |
335 | obj.mode = "chip"; | 337 | obj.mode = "chip"; |
336 | obj.offset = 0; | 338 | obj.offset = 0; |
337 | 339 | ||
340 | if (aField.id) obj.id = aField.id; | ||
341 | if (aField.prop) obj.prop = aField.prop; | ||
342 | |||
338 | obj.changeDelegate = this.handleColorChange; | 343 | obj.changeDelegate = this.handleColorChange; |
339 | 344 | ||
340 | this.controls[aField.id] = obj; | 345 | this.controls[aField.id] = obj; |