aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements/shapes-controller.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-23 10:38:51 -0800
committerJose Antonio Marquez2012-02-23 10:38:51 -0800
commitd764428023d87446fbbb153d8e04a23b900d71d5 (patch)
tree2581815db5567b52d4c59663ea9e37d6df057ca3 /js/controllers/elements/shapes-controller.js
parent3e1be6d4d4f0d3a2474af7d915954f9b6464fe2e (diff)
parentcc295dd0fb873505eed01c232bd987cf6e2dcdd9 (diff)
downloadninja-d764428023d87446fbbb153d8e04a23b900d71d5.tar.gz
Merge branch 'refs/heads/NinjaInternal' into Color
Diffstat (limited to 'js/controllers/elements/shapes-controller.js')
-rwxr-xr-xjs/controllers/elements/shapes-controller.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index 5ced8820..a4c31c3e 100755
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -230,6 +230,10 @@ exports.ShapesController = Montage.create(CanvasController, {
230 setColor: { 230 setColor: {
231 value: function(el, color, isFill) { 231 value: function(el, color, isFill) {
232 var webGl = color.webGlColor || color.color.webGlColor; 232 var webGl = color.webGlColor || color.color.webGlColor;
233 if(!webGl)
234 {
235 webGl = this.application.ninja.colorController.colorModel.colorToWebGl(color.color);
236 }
233 if(isFill) 237 if(isFill)
234 { 238 {
235 el.elementModel.shapeModel.GLGeomObj.setFillColor(webGl); 239 el.elementModel.shapeModel.GLGeomObj.setFillColor(webGl);
@@ -241,6 +245,14 @@ exports.ShapesController = Montage.create(CanvasController, {
241 el.elementModel.shapeModel.GLGeomObj.setStrokeColor(webGl); 245 el.elementModel.shapeModel.GLGeomObj.setStrokeColor(webGl);
242 this.setShapeProperty(el, "stroke", webGl); 246 this.setShapeProperty(el, "stroke", webGl);
243 this.setShapeProperty(el, "border", color); 247 this.setShapeProperty(el, "border", color);
248 if(color.strokeInfo)
249 {
250 var strokeWidth = this.GetValueInPixels(color.strokeInfo.strokeSize,
251 color.strokeInfo.strokeUnits);
252 el.elementModel.shapeModel.GLGeomObj.setStrokeWidth(strokeWidth);
253 this.setShapeProperty(el, "strokeSize", color.strokeInfo.strokeSize + " "
254 + color.strokeInfo.strokeUnits);
255 }
244 } 256 }
245 el.elementModel.shapeModel.GLWorld.render(); 257 el.elementModel.shapeModel.GLWorld.render();
246 } 258 }