diff options
author | Eric Guzman | 2012-06-19 01:20:36 -0700 |
---|---|---|
committer | Eric Guzman | 2012-06-19 01:20:36 -0700 |
commit | 2ef72cdf0e59fb3623a2c13251ac707522f3dc5a (patch) | |
tree | f69f4e3de7e4441311ef2b38770e0ce26067aac4 /js/panels/properties.reel/sections/custom.reel/custom.js | |
parent | 5260d3dfd99d79924c4aaa3ab798e90c7d328d7d (diff) | |
parent | 1007cbf983ad0f2460a4122a492a96023fdb4439 (diff) | |
download | ninja-2ef72cdf0e59fb3623a2c13251ac707522f3dc5a.tar.gz |
Merge branch 'binding' of github.com:dhg637/ninja-internal into binding
Conflicts:
js/stage/binding-view.reel/binding-view.js
Diffstat (limited to 'js/panels/properties.reel/sections/custom.reel/custom.js')
-rwxr-xr-x | js/panels/properties.reel/sections/custom.reel/custom.js | 12 |
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 | }, |