From 830b011d94d728882286d72e129f7405134957c7 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 1 Feb 2012 17:05:07 -0800 Subject: Updated color code in the PI to go through element mediator. Signed-off-by: Nivesh Rajbhandari --- js/data/pi/pi-data.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'js/data') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index f162e919..748f19bb 100644 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -23,13 +23,13 @@ exports.PiData = Montage.create( Montage, { { type : "color", id : "colorStroke", - prop: "border-color", + prop: "border", label : "Stroke" }, { type : "color", id : "colorFill", - prop: "background-color", + prop: "background", divider : true } ], @@ -102,11 +102,13 @@ exports.PiData = Montage.create( Montage, { { type : "color", id : "colorStroke", + prop: "border", label : "Stroke" }, { type : "color", id : "colorFill", + prop: "background", divider : true } ], @@ -221,13 +223,13 @@ exports.PiData = Montage.create( Montage, { { type : "color", id : "colorStroke", - prop: "border-color", + prop: "border", label : "Stroke" }, { type : "color", id : "colorFill", - prop: "background-color", + prop: "background", divider : true } ], @@ -279,10 +281,12 @@ exports.PiData = Montage.create( Montage, { [ { type : "color", + prop: "border", id : "stroke" }, { type : "color", + prop: "background", id : "fill", divider : true } @@ -387,11 +391,13 @@ exports.PiData = Montage.create( Montage, { [ { type : "color", + prop: "border", id : "stroke" }, { type : "color", id : "fill", + prop: "background", visible : false, divider : true } @@ -438,10 +444,12 @@ exports.PiData = Montage.create( Montage, { [ { type : "color", + prop: "border", id : "stroke" }, { type : "color", + prop: "background", id : "fill", divider : true } -- cgit v1.2.3 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 From 737169d194fc29c82ee784b561065f287e259f88 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 2 Feb 2012 15:35:27 -0800 Subject: Fixing keyboard shortcut and tooltip for hand and 3d tools. Signed-off-by: Nivesh Rajbhandari --- js/data/tools-data.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/data') diff --git a/js/data/tools-data.js b/js/data/tools-data.js index 8ea84574..de965dbc 100644 --- a/js/data/tools-data.js +++ b/js/data/tools-data.js @@ -37,7 +37,7 @@ exports.ToolsData = Montage.create(Montage, { "properties": "rotate3DProperties", "spriteSheet": true, "action": "Rotate3DTool", - "toolTip": "3D Rotate Object Tool", + "toolTip": "3D Rotate Object Tool (W)", "cursor": "auto", "lastInGroup": false, "container": false, @@ -48,7 +48,7 @@ exports.ToolsData = Montage.create(Montage, { "properties": "translate3DProperties", "spriteSheet": true, "action": "Translate3DTool", - "toolTip": "3D Translate Object Tool", + "toolTip": "3D Translate Object Tool (G)", "cursor": "auto", "lastInGroup": true, "container": false, @@ -206,7 +206,7 @@ exports.ToolsData = Montage.create(Montage, { "properties": "panProperties", "spriteSheet": true, "action": "PanTool", - "toolTip": "Pan Tool", + "toolTip": "Hand Tool (H)", "cursor": "url('images/tools/hand_down.png'), default", "lastInGroup": false, "container": false, -- cgit v1.2.3 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') 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