From 67a4be50a20207df28bedf1ebb01429670057165 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Thu, 4 Sep 2014 22:59:24 +0200 Subject: [PATCH] Update polyline.class.js Mirror polygon changes --- src/shapes/polyline.class.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) 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); }, /**