aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties/sections
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/properties/sections')
-rw-r--r--js/panels/properties/sections/custom.reel/custom.js13
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;