diff --git a/src/item/Item.js b/src/item/Item.js index 6ec1591b..b50c91e6 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -2371,6 +2371,23 @@ function(name) { * the specified type} */ + /** + * Private method that sets Path related styles on the canvas context. + * Not defined in Path as it is required by other classes too, + * e.g. PointText. + */ + _setStyles: function(ctx) { + var style = this._style, + width = style.getStrokeWidth(), + join = style.getStrokeJoin(), + cap = style.getStrokeCap(), + limit = style.getMiterLimit(); + if (width != null) ctx.lineWidth = width; + if (join) ctx.lineJoin = join; + if (cap) ctx.lineCap = cap; + if (limit) ctx.miterLimit = limit; + }, + statics: { drawSelectedBounds: function(bounds, ctx, matrix) { var coords = matrix._transformCorners(bounds); diff --git a/src/path/Path.js b/src/path/Path.js index fd760f79..89e3e928 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -1386,18 +1386,6 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{ } return { - _setStyles: function(ctx) { - var style = this._style, - width = style.getStrokeWidth(), - join = style.getStrokeJoin(), - cap = style.getStrokeCap(), - limit = style.getMiterLimit(); - if (width != null) ctx.lineWidth = width; - if (join) ctx.lineJoin = join; - if (cap) ctx.lineCap = cap; - if (limit) ctx.miterLimit = limit; - }, - draw: function(ctx, param) { if (!param.compound) ctx.beginPath();