aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties.reel/sections/custom.reel/custom.js
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-19 01:03:59 -0700
committerArmen Kesablyan2012-06-19 01:03:59 -0700
commit2e13a73e4ee980a6f73f6ff48b2a195eb209a7db (patch)
treed352f5e769eae0e1b7b76ccbeafa9b174b1a9918 /js/panels/properties.reel/sections/custom.reel/custom.js
parent244e608645778746d1a3b5aa0d4c0868f7c5c272 (diff)
parentc59eb371559a3061ce53223e249ca97daace5968 (diff)
downloadninja-2e13a73e4ee980a6f73f6ff48b2a195eb209a7db.tar.gz
Merge branch 'refs/heads/master' into binding
Conflicts: js/components/layout/tools-list.reel/tools-list.html js/components/layout/tools-properties.reel/tools-properties.html js/document/document-html.js js/document/templates/app/main.js js/panels/Panel.reel/Panel.js node_modules/montage/ui/native-control.js Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/panels/properties.reel/sections/custom.reel/custom.js')
-rwxr-xr-xjs/panels/properties.reel/sections/custom.reel/custom.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/js/panels/properties.reel/sections/custom.reel/custom.js b/js/panels/properties.reel/sections/custom.reel/custom.js
index 9df16112..08434b01 100755
--- a/js/panels/properties.reel/sections/custom.reel/custom.js
+++ b/js/panels/properties.reel/sections/custom.reel/custom.js
@@ -116,7 +116,11 @@ exports.CustomSection = Montage.create(Component, {
116 value: function(event) { 116 value: function(event) {
117 // Change the stage color for now 117 // Change the stage color for now
118 //console.log(this, event); 118 //console.log(this, event);
119 ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, [event._event.color.css], "Change", "pi", ''); 119 if (event._event.color && event._event.color.css) {
120 ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, [event._event.color.css], "Change", "pi", '');
121 } else {
122 ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, ['none'], "Change", "pi", '');
123 }
120 /* 124 /*
121 var propEvent = document.createEvent("CustomEvent"); 125 var propEvent = document.createEvent("CustomEvent");
122 propEvent.initEvent("propertyChange", true, true); 126 propEvent.initEvent("propertyChange", true, true);
@@ -233,6 +237,12 @@ exports.CustomSection = Montage.create(Component, {
233 boundObjectPropertyPath: "value" 237 boundObjectPropertyPath: "value"
234 }); 238 });
235 239
240 //Bind object value to controls list so it can be manipulated
241 Object.defineBinding(this.controls, aField.id + "Units", {
242 boundObject: obj,
243 boundObjectPropertyPath: "units"
244 });
245
236 return obj; 246 return obj;
237 } 247 }
238 }, 248 },