From 8122876daad3e5a03b33f522751f3aca354615ca Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 5 Apr 2012 15:53:20 -0700 Subject: Fix for line tool not working because PI requests fill color for line as well and line shape doesn't have getFillColor method. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/shapes-controller.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'js/controllers/elements') diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js index d1bc1fb7..514b1472 100755 --- a/js/controllers/elements/shapes-controller.js +++ b/js/controllers/elements/shapes-controller.js @@ -386,7 +386,16 @@ exports.ShapesController = Montage.create(CanvasController, { value: function(el, isFill) { if(isFill) { - return this.application.ninja.colorController.colorModel.webGlToColor(el.elementModel.shapeModel.GLGeomObj.getFillColor()); + // Properties Panel asks for fill color even for shapes that only have strokes + // Check that shape object has a getFillColor method before getting fills + if(el.elementModel.shapeModel.GLGeomObj.getFillColor) + { + return this.application.ninja.colorController.colorModel.webGlToColor(el.elementModel.shapeModel.GLGeomObj.getFillColor()); + } + else + { + return null; + } } else { -- cgit v1.2.3