mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-19 02:51:07 +00:00
Include pathOffset in fabric.Path.toObject()
Include pathOffset in toObject() of fabric.Path and use it (if defined) in _initializePath(). This should fix issue #500.
This commit is contained in:
parent
45d54d9fac
commit
0b078cd4be
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue