mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-18 02:21:07 +00:00
Fix line rendering when points make height become negative. Closes #589
This commit is contained in:
parent
f3f1db63b3
commit
8a52f99292
4 changed files with 7 additions and 7 deletions
4
dist/all.js
vendored
4
dist/all.js
vendored
|
|
@ -12038,8 +12038,8 @@ fabric.util.object.extend(fabric.Object.prototype, /** @lends fabric.Object.prot
|
|||
_setWidthHeight: function(options) {
|
||||
options || (options = { });
|
||||
|
||||
this.set('width', (this.x2 - this.x1) || 1);
|
||||
this.set('height', (this.y2 - this.y1) || 1);
|
||||
this.set('width', Math.abs(this.x2 - this.x1) || 1);
|
||||
this.set('height', Math.abs(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));
|
||||
|
|
|
|||
6
dist/all.min.js
vendored
6
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.
|
|
@ -56,8 +56,8 @@
|
|||
_setWidthHeight: function(options) {
|
||||
options || (options = { });
|
||||
|
||||
this.set('width', (this.x2 - this.x1) || 1);
|
||||
this.set('height', (this.y2 - this.y1) || 1);
|
||||
this.set('width', Math.abs(this.x2 - this.x1) || 1);
|
||||
this.set('height', Math.abs(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