mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-18 18:41:08 +00:00
Fix fabric.Line regression.
This commit is contained in:
parent
8581f94341
commit
c988e5a8c3
4 changed files with 7 additions and 5 deletions
5
dist/all.js
vendored
5
dist/all.js
vendored
|
|
@ -8674,8 +8674,9 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, {
|
|||
_setWidthHeight: function(options) {
|
||||
options || (options = { });
|
||||
|
||||
this.set('width', 'width' in options ? options.width : ((this.x2 - this.x1) || 1));
|
||||
this.set('height', 'height' in options ? options.height : ((this.y2 - this.y1) || 1));
|
||||
this.set('width', (this.x2 - this.x1) || 1);
|
||||
this.set('height', (this.y2 - this.y1) || 1);
|
||||
|
||||
this.set('left', 'left' in options ? options.left : (this.x1 + this.width / 2));
|
||||
this.set('top', 'top' in options ? options.top : (this.y1 + this.height / 2));
|
||||
},
|
||||
|
|
|
|||
2
dist/all.min.js
vendored
2
dist/all.min.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/all.min.js.gz
vendored
BIN
dist/all.min.js.gz
vendored
Binary file not shown.
|
|
@ -49,8 +49,9 @@
|
|||
_setWidthHeight: function(options) {
|
||||
options || (options = { });
|
||||
|
||||
this.set('width', 'width' in options ? options.width : ((this.x2 - this.x1) || 1));
|
||||
this.set('height', 'height' in options ? options.height : ((this.y2 - this.y1) || 1));
|
||||
this.set('width', (this.x2 - this.x1) || 1);
|
||||
this.set('height', (this.y2 - this.y1) || 1);
|
||||
|
||||
this.set('left', 'left' in options ? options.left : (this.x1 + this.width / 2));
|
||||
this.set('top', 'top' in options ? options.top : (this.y1 + this.height / 2));
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue