From 89d64cf06e170c3c50b02eeadd9dcf10d6efe1a3 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 2 Feb 2012 13:22:30 -0800 Subject: Updating Shapes PI to support corner radii. Also fixed PI bug where we were always updating custom section 0. Signed-off-by: Nivesh Rajbhandari --- js/data/pi/pi-data.js | 48 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 14 deletions(-) (limited to 'js/data') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index f162e919..de5cd34d 100644 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -279,11 +279,13 @@ exports.PiData = Montage.create( Montage, { [ { type : "color", - id : "stroke" + id : "stroke", + prop : "stroke" }, { type : "color", id : "fill", + prop : "fill", divider : true } ], @@ -313,10 +315,11 @@ exports.PiData = Montage.create( Montage, { id: "tlRadius", prop : "tlRadius", label: "TL", + valueMutator: parseFloat, value : 0, min : 0, max : 100, - unit : "%", + unit : "px", acceptableUnits: ["px", "pt", "%"] }, { @@ -324,10 +327,12 @@ exports.PiData = Montage.create( Montage, { id : "trRadius", prop : "trRadius", label : "TR", + valueMutator: parseFloat, min : 0, max : 100, - unit : "%", - acceptableUnits: ["px", "pt", "%"] + unit : "px", + acceptableUnits: ["px", "pt", "%"], + divider: true } ], [ @@ -336,9 +341,10 @@ exports.PiData = Montage.create( Montage, { id : "blRadius", prop : "blRadius", label : "BL", + valueMutator: parseFloat, min : 0, max : 100, - unit : "%", + unit : "px", acceptableUnits: ["px", "pt", "%"] }, { @@ -346,9 +352,10 @@ exports.PiData = Montage.create( Montage, { id : "brRadius", prop : "brRadius", label : "BR", + valueMutator: parseFloat, min : 0, max : 100, - unit : "%", + unit : "px", acceptableUnits: ["px", "pt", "%"] } ] @@ -362,13 +369,18 @@ exports.PiData = Montage.create( Montage, { { type: "dropdown", id: "strokeMaterial", + prop: "strokeMaterial", label: "Stroke", labelField: "_name", - items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" } - }, + items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, + divider : true + } + ], + [ { type: "dropdown", id: "fillMaterial", + prop: "fillMaterial", label: "Fill", labelField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" } @@ -387,7 +399,8 @@ exports.PiData = Montage.create( Montage, { [ { type : "color", - id : "stroke" + id : "stroke", + prop : "stroke" }, { type : "color", @@ -438,11 +451,13 @@ exports.PiData = Montage.create( Montage, { [ { type : "color", - id : "stroke" + id : "stroke", + prop : "stroke" }, { type : "color", id : "fill", + prop : "fill", divider : true } ], @@ -452,7 +467,6 @@ exports.PiData = Montage.create( Montage, { id : "strokeSize", prop : "strokeSize", label : "Stroke", - valueMutator: parseFloat, min : 0, max : 100, value : 1, @@ -471,7 +485,8 @@ exports.PiData = Montage.create( Montage, { type: "hottext", id: "innerRadius", prop: "innerRadius", - label: "Inner Radius", + label: "Inner R", + valueMutator: parseFloat, value : 0, min : 0, max : 100, @@ -490,13 +505,18 @@ exports.PiData = Montage.create( Montage, { { type: "dropdown", id: "strokeMaterial", + prop: "strokeMaterial", label: "Stroke", labelFunction: function(item) { return item.getName(); }, - items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" } - }, + items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, + divider : true + } + ], + [ { type: "dropdown", id: "fillMaterial", + prop: "fillMaterial", label: "Fill", labelField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" } -- cgit v1.2.3