From 2edf68e0de786cdc92d5f41548fd61e6c77a57ec Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 13 Feb 2012 09:56:40 -0800 Subject: Updated ink bottle tool to use new setColor routine in the mediator and controllers. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/shapes-controller.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'js/controllers/elements/shapes-controller.js') diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js index 640119c4..42c2528f 100644 --- a/js/controllers/elements/shapes-controller.js +++ b/js/controllers/elements/shapes-controller.js @@ -260,6 +260,14 @@ exports.ShapesController = Montage.create(CanvasController, { el.elementModel.shapeModel.GLGeomObj.setStrokeColor(webGl); this.setShapeProperty(el, "stroke", webGl); this.setShapeProperty(el, "border", color); + if(color.strokeInfo) + { + var strokeWidth = this.GetValueInPixels(color.strokeInfo.strokeSize, + color.strokeInfo.strokeUnits); + el.elementModel.shapeModel.GLGeomObj.setStrokeWidth(strokeWidth); + this.setShapeProperty(el, "strokeSize", color.strokeInfo.strokeSize + " " + + color.strokeInfo.strokeUnits); + } } el.elementModel.shapeModel.GLWorld.render(); } -- cgit v1.2.3 From c0ab12c07d18149e3704d3e5f66aee43c13b7fd0 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 13 Feb 2012 11:57:04 -0800 Subject: Working around inconsistent color object when getting/setting WebGL values. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/shapes-controller.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'js/controllers/elements/shapes-controller.js') diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js index 42c2528f..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, { setColor: { value: function(el, color, isFill) { var webGl = color.webGlColor || color.color.webGlColor; + if(!webGl) + { + webGl = this.application.ninja.colorController.colorModel.colorToWebGl(color.color); + } if(isFill) { el.elementModel.shapeModel.GLGeomObj.setFillColor(webGl); -- cgit v1.2.3