diff --git a/src/shapes/polyline.class.js b/src/shapes/polyline.class.js index cd16df03..b90edd47 100644 --- a/src/shapes/polyline.class.js +++ b/src/shapes/polyline.class.js @@ -32,6 +32,20 @@ */ points: null, + /** + * Minimum X from points values, necessary to offset points + * @type Number + * @default + */ + minX: 0, + + /** + * Minimum Y from points values, necessary to offset points + * @type Number + * @default + */ + minY: 0, + /** * Constructor * @param {Array} points Array of points (where each point is an object with x and y) @@ -53,10 +67,7 @@ * }); */ initialize: function(points, options) { - options = options || { }; - this.set('points', points); - this.callSuper('initialize', options); - this._calcDimensions(); + return fabric.Polygon.prototype.initialize.call(this, points, options); }, /**