mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-17 12:50:57 +00:00
Check infinity in setCoords() if object has zero width
This commit is contained in:
parent
6c3bfa5c92
commit
d2d1c50872
1 changed files with 1 additions and 1 deletions
|
|
@ -222,7 +222,7 @@
|
|||
Math.pow(this.currentWidth / 2, 2) +
|
||||
Math.pow(this.currentHeight / 2, 2));
|
||||
|
||||
var _angle = Math.atan(this.currentHeight / this.currentWidth);
|
||||
var _angle = Math.atan(isFinite(this.currentHeight / this.currentWidth) ? this.currentHeight / this.currentWidth : 0);
|
||||
|
||||
// offset added for rotate and scale actions
|
||||
var offsetX = Math.cos(_angle + theta) * _hypotenuse,
|
||||
|
|
|
|||
Loading…
Reference in a new issue