diff options
Diffstat (limited to 'js/controllers/elements/shapes-controller.js')
-rwxr-xr-x | js/controllers/elements/shapes-controller.js | 12 |
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 | } |