From f94b0c5ada403379b3ff8a900c2a2aabcecce49e Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 6 Feb 2012 14:03:40 -0800 Subject: Add enabled property for ComboBox to support enabling/disabling materials dropdowns in the PI. Signed-off-by: Nivesh Rajbhandari --- js/panels/properties/sections/custom.reel/custom.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'js/panels/properties/sections/custom.reel/custom.js') diff --git a/js/panels/properties/sections/custom.reel/custom.js b/js/panels/properties/sections/custom.reel/custom.js index 2b5b522a..e92a39fd 100644 --- a/js/panels/properties/sections/custom.reel/custom.js +++ b/js/panels/properties/sections/custom.reel/custom.js @@ -193,6 +193,18 @@ exports.CustomSection = Montage.create(Component, { obj.items = aField.items; } } + if (aField.enabled) { + if(aField.enabled.boundObject) { + // TODO - For now, always bind to this.controls[someProperty] + Object.defineBinding(obj, "enabled", { + boundObject: this.controls, + boundObjectPropertyPath: aField.enabled.boundProperty, + oneway: false + }); + } else { + obj.enabled = aField.enabled; + } + } obj.addEventListener("change", this, false); // -- cgit v1.2.3 From 8ad767b61460984a4031ba630f76ac8247a61857 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 7 Feb 2012 11:42:10 -0800 Subject: Fixed PI to support WebGL materials. Signed-off-by: Nivesh Rajbhandari --- js/panels/properties/sections/custom.reel/custom.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/panels/properties/sections/custom.reel/custom.js') diff --git a/js/panels/properties/sections/custom.reel/custom.js b/js/panels/properties/sections/custom.reel/custom.js index e92a39fd..992db8e6 100644 --- a/js/panels/properties/sections/custom.reel/custom.js +++ b/js/panels/properties/sections/custom.reel/custom.js @@ -186,6 +186,8 @@ exports.CustomSection = Montage.create(Component, { if (aField.value) obj.value = aField.value; if (aField.labelField) obj.labelField = aField.labelField; if (aField.labelFunction) obj.labelFunction = aField.labelFunction; + if (aField.dataField) obj.dataField = aField.dataField; + if (aField.dataFunction) obj.dataFunction = aField.dataFunction; if (aField.items) { if(aField.items.boundObject) { obj.items = eval(aField.items.boundObject)[aField.items.boundProperty]; -- cgit v1.2.3