From 509092ff335f74517a413cfb2deeb9d2de20f8e3 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 12 Jun 2012 15:13:09 -0700 Subject: Fixing properties panel to support px and % for body and other elements. Signed-off-by: Nivesh Rajbhandari --- js/data/pi/pi-data.js | 60 +++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'js/data/pi') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index 92d70141..e3e1de15 100755 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -52,8 +52,8 @@ exports.PiData = Montage.create( Montage, { type : "hottext", id : "borderWidth", prop : "border-width", - defaultValue: 0, - valueMutator: parseFloat, + defaultValue: "0 px", + inputFunction: parseFloat, label : "Border", min : 0, max : 100, @@ -131,8 +131,8 @@ exports.PiData = Montage.create( Montage, { type : "hottext", id : "borderWidth", prop : "border-width", - defaultValue: 0, - valueMutator: parseFloat, + defaultValue: "0 px", + inputFunction: parseFloat, label : "Border", min : 0, max : 100, @@ -254,8 +254,8 @@ exports.PiData = Montage.create( Montage, { type : "hottext", id : "borderWidth", prop : "border-width", - defaultValue: 0, - valueMutator: parseFloat, + defaultValue: "0 px", + inputFunction: parseFloat, label : "Border", min : 0, max : 100, @@ -313,7 +313,7 @@ exports.PiData = Montage.create( Montage, { id : "strokeSize", prop : "strokeSize", label : "Stroke", - valueMutator: parseFloat, + inputFunction: parseFloat, min : 0, max : 100, value : 1, @@ -333,23 +333,23 @@ exports.PiData = Montage.create( Montage, { id: "tlRadius", prop : "tlRadius", label: "TL", - valueMutator: parseFloat, + inputFunction: parseFloat, value : 0, min : 0, - max : 100, - unit : "px", - acceptableUnits: ["px", "pt", "%"] + max : 1000, + acceptableUnits: ["px", "pt", "%"], + unit : "px" }, { type : "hottext", id : "trRadius", prop : "trRadius", label : "TR", - valueMutator: parseFloat, + inputFunction: parseFloat, min : 0, - max : 100, - unit : "px", + max : 1000, acceptableUnits: ["px", "pt", "%"], + unit : "px", divider: true } ], @@ -359,22 +359,22 @@ exports.PiData = Montage.create( Montage, { id : "blRadius", prop : "blRadius", label : "BL", - valueMutator: parseFloat, + inputFunction: parseFloat, min : 0, - max : 100, - unit : "px", - acceptableUnits: ["px", "pt", "%"] + max : 1000, + acceptableUnits: ["px", "pt", "%"], + unit : "px" }, { type : "hottext", id : "brRadius", prop : "brRadius", label : "BR", - valueMutator: parseFloat, + inputFunction: parseFloat, min : 0, - max : 100, - unit : "px", - acceptableUnits: ["px", "pt", "%"] + max : 1000, + acceptableUnits: ["px", "pt", "%"], + unit : "px" } ] ] @@ -473,7 +473,7 @@ exports.PiData = Montage.create( Montage, { id : "strokeSize", prop : "strokeSize", label : "Stroke", - valueMutator: parseFloat, + inputFunction: parseFloat, min : 0, max : 100, value : 1, @@ -557,7 +557,7 @@ exports.PiData = Montage.create( Montage, { id : "strokeSize", prop : "strokeSize", label : "Stroke", - valueMutator: parseFloat, + inputFunction: parseFloat, min : 0, max : 100, value : 1, @@ -577,7 +577,7 @@ exports.PiData = Montage.create( Montage, { id: "innerRadius", prop: "innerRadius", label: "Inner R", - valueMutator: parseFloat, + inputFunction: parseFloat, value : 0, min : 0, max : 99, @@ -681,7 +681,7 @@ exports.PiData = Montage.create( Montage, { id : "strokeSize", prop : "strokeSize", label : "Stroke", - valueMutator: parseFloat, + inputFunction: parseFloat, min : 1, max : 100, value : 1, @@ -720,7 +720,7 @@ exports.PiData = Montage.create( Montage, { id : "strokeSize", prop : "strokeSize", label : "Stroke", - valueMutator: parseInt, + inputFunction: parseInt, min : 1, max : 100, value : 1, @@ -732,7 +732,7 @@ exports.PiData = Montage.create( Montage, { id : "strokeHardness", prop : "strokeHardness", label : "Hardness", - valueMutator: parseInt, + inputFunction: parseInt, min : 0, max : 100, value : 100, @@ -759,7 +759,7 @@ exports.PiData = Montage.create( Montage, { id : "strokeSmoothing", prop : "strokeSmoothing", label : "Amount", - valueMutator: parseFloat, + inputFunction: parseFloat, min : 0, max : 100, value : 0, @@ -787,7 +787,7 @@ exports.PiData = Montage.create( Montage, { id : "strokeAngle", prop : "strokeAngle", label : "Angle", - valueMutator: parseFloat, + inputFunction: parseFloat, min : -90, max : 90, value : 0, -- cgit v1.2.3