From fd44b7c326acf413367667690e937709f03601e3 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 3 Feb 2012 17:09:02 -0800 Subject: We were only updating the first custom section in the PI. Signed-off-by: Nivesh Rajbhandari --- js/data/pi/pi-data.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'js/data/pi') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index 1f8870ca..dd75e255 100644 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -288,7 +288,6 @@ exports.PiData = Montage.create( Montage, { type : "color", prop: "background", id : "fill", - prop : "fill", divider : true } ], @@ -462,7 +461,6 @@ exports.PiData = Montage.create( Montage, { type : "color", prop: "background", id : "fill", - prop : "fill", divider : true } ], -- cgit v1.2.3 From 486d9a31a85dd833a1c798049a00403756703034 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 6 Feb 2012 11:35:49 -0800 Subject: Support use WebGL checkbox in the PI. Signed-off-by: Nivesh Rajbhandari --- js/data/pi/pi-data.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'js/data/pi') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index dd75e255..8ccf17cc 100644 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -367,6 +367,16 @@ exports.PiData = Montage.create( Montage, { label: "Materials", Section: [ + [ + { + type: "checkbox", + id: "useWebGl", + prop: "useWebGl", + defaultValue: false, + value: "Use WebGL", + checked: false + } + ], [ { type: "dropdown", @@ -432,6 +442,16 @@ exports.PiData = Montage.create( Montage, { label: "Materials", Section: [ + [ + { + type: "checkbox", + id: "useWebGl", + prop: "useWebGl", + defaultValue: false, + value: "Use WebGL", + checked: false + } + ], [ { type: "dropdown", @@ -505,6 +525,16 @@ exports.PiData = Montage.create( Montage, { label: "Materials", Section: [ + [ + { + type: "checkbox", + id: "useWebGl", + prop: "useWebGl", + defaultValue: false, + value: "Use WebGL", + checked: false + } + ], [ { type: "dropdown", -- cgit v1.2.3 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/pi') 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 From 486842239c71e7964f38a09aacda4970f2a82e1a Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 7 Feb 2012 10:58:14 -0800 Subject: Updated tools and PI to get/set materials by binding to appModel's materials property. This requires us to add FlatMaterial to the list of materials in the MaterialsLibrary. Signed-off-by: Nivesh Rajbhandari --- js/data/pi/pi-data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/data/pi') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index 901ca37f..de192b57 100644 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -544,7 +544,7 @@ exports.PiData = Montage.create( Montage, { id: "strokeMaterial", prop: "strokeMaterial", label: "Stroke", - labelFunction: function(item) { return item.getName(); }, + labelField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, enabled: { boundObject: "this.controls", boundProperty: "useWebGl" }, divider : true -- 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/data/pi/pi-data.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'js/data/pi') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index de192b57..10b33a0e 100644 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -384,6 +384,7 @@ exports.PiData = Montage.create( Montage, { prop: "strokeMaterial", label: "Stroke", labelField: "_name", + dataField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, enabled: { boundObject: "this.controls", boundProperty: "useWebGl" }, divider : true @@ -396,6 +397,7 @@ exports.PiData = Montage.create( Montage, { prop: "fillMaterial", label: "Fill", labelField: "_name", + dataField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, enabled: { boundObject: "this.controls", boundProperty: "useWebGl" } } @@ -460,6 +462,7 @@ exports.PiData = Montage.create( Montage, { id: "stroke", label: "Stroke", labelField: "_name", + dataField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, enabled: { boundObject: "this.controls", boundProperty: "useWebGl" } } @@ -545,6 +548,7 @@ exports.PiData = Montage.create( Montage, { prop: "strokeMaterial", label: "Stroke", labelField: "_name", + dataField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, enabled: { boundObject: "this.controls", boundProperty: "useWebGl" }, divider : true @@ -557,6 +561,7 @@ exports.PiData = Montage.create( Montage, { prop: "fillMaterial", label: "Fill", labelField: "_name", + dataField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, enabled: { boundObject: "this.controls", boundProperty: "useWebGl" } } -- cgit v1.2.3