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/data/pi/pi-data.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'js/data') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index 8ccf17cc..901ca37f 100644 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -385,6 +385,7 @@ exports.PiData = Montage.create( Montage, { label: "Stroke", labelField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, + enabled: { boundObject: "this.controls", boundProperty: "useWebGl" }, divider : true } ], @@ -395,7 +396,8 @@ exports.PiData = Montage.create( Montage, { prop: "fillMaterial", label: "Fill", labelField: "_name", - items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" } + items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, + enabled: { boundObject: "this.controls", boundProperty: "useWebGl" } } ] ] @@ -458,7 +460,8 @@ exports.PiData = Montage.create( Montage, { id: "stroke", label: "Stroke", labelField: "_name", - items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" } + items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, + enabled: { boundObject: "this.controls", boundProperty: "useWebGl" } } ] ] @@ -543,6 +546,7 @@ exports.PiData = Montage.create( Montage, { label: "Stroke", labelFunction: function(item) { return item.getName(); }, items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, + enabled: { boundObject: "this.controls", boundProperty: "useWebGl" }, divider : true } ], @@ -553,7 +557,8 @@ exports.PiData = Montage.create( Montage, { prop: "fillMaterial", label: "Fill", labelField: "_name", - items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" } + items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, + enabled: { boundObject: "this.controls", boundProperty: "useWebGl" } } ] ] -- cgit v1.2.3