aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements/shapes-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/elements/shapes-controller.js')
-rw-r--r--js/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 640119c4..8953f155 100644
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -249,6 +249,10 @@ exports.ShapesController = Montage.create(CanvasController, {
249 setColor: { 249 setColor: {
250 value: function(el, color, isFill) { 250 value: function(el, color, isFill) {
251 var webGl = color.webGlColor || color.color.webGlColor; 251 var webGl = color.webGlColor || color.color.webGlColor;
252 if(!webGl)
253 {
254 webGl = this.application.ninja.colorController.colorModel.colorToWebGl(color.color);
255 }
252 if(isFill) 256 if(isFill)
253 { 257 {
254 el.elementModel.shapeModel.GLGeomObj.setFillColor(webGl); 258 el.elementModel.shapeModel.GLGeomObj.setFillColor(webGl);
@@ -260,6 +264,14 @@ exports.ShapesController = Montage.create(CanvasController, {
260 el.elementModel.shapeModel.GLGeomObj.setStrokeColor(webGl); 264 el.elementModel.shapeModel.GLGeomObj.setStrokeColor(webGl);
261 this.setShapeProperty(el, "stroke", webGl); 265 this.setShapeProperty(el, "stroke", webGl);
262 this.setShapeProperty(el, "border", color); 266 this.setShapeProperty(el, "border", color);
267 if(color.strokeInfo)
268 {
269 var strokeWidth = this.GetValueInPixels(color.strokeInfo.strokeSize,
270 color.strokeInfo.strokeUnits);
271 el.elementModel.shapeModel.GLGeomObj.setStrokeWidth(strokeWidth);
272 this.setShapeProperty(el, "strokeSize", color.strokeInfo.strokeSize + " "
273 + color.strokeInfo.strokeUnits);
274 }
263 } 275 }
264 el.elementModel.shapeModel.GLWorld.render(); 276 el.elementModel.shapeModel.GLWorld.render();
265 } 277 }