From 0b078cd4bec67d13d91958f0f9847c5341958f9e Mon Sep 17 00:00:00 2001 From: Kienz Date: Thu, 28 Mar 2013 16:07:00 +0100 Subject: [PATCH] Include pathOffset in fabric.Path.toObject() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Include pathOffset in toObject() of fabric.Path and use it (if defined) inĀ _initializePath(). This should fix issue #500. --- src/path.class.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/path.class.js b/src/path.class.js index c7f0b66a..356bc785 100644 --- a/src/path.class.js +++ b/src/path.class.js @@ -229,7 +229,7 @@ this.left = this.width / 2; } } - this.pathOffset = this._calculatePathOffset(isTopSet || isLeftSet); //Save top-left coords as offset + this.pathOffset = this.pathOffset || this._calculatePathOffset(isTopSet || isLeftSet); //Save top-left coords as offset }, /** @@ -607,7 +607,8 @@ */ toObject: function(propertiesToInclude) { var o = extend(this.callSuper('toObject', propertiesToInclude), { - path: this.path + path: this.path, + pathOffset: this.pathOffset }); if (this.sourcePath) { o.sourcePath = this.sourcePath;