diff --git a/dist/all.js b/dist/all.js index e17e8ce2..b21c0304 100644 --- a/dist/all.js +++ b/dist/all.js @@ -8265,6 +8265,11 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, { this.currentWidth = (this.width + strokeWidth) * this.scaleX + padding * 2; this.currentHeight = (this.height + strokeWidth) * this.scaleY + padding * 2; + //If width is negative, make postive. Fixes path selection issue + if(this.currentWidth < 0){ + this.currentWidth = Math.abs(this.currentWidth); + } + this._hypotenuse = Math.sqrt( Math.pow(this.currentWidth / 2, 2) + Math.pow(this.currentHeight / 2, 2)); diff --git a/dist/all.min.js.gz b/dist/all.min.js.gz index a46582ab..e69de29b 100644 Binary files a/dist/all.min.js.gz and b/dist/all.min.js.gz differ diff --git a/src/object.class.js b/src/object.class.js index 99d22d75..a35b9222 100644 --- a/src/object.class.js +++ b/src/object.class.js @@ -645,6 +645,11 @@ this.currentWidth = (this.width + strokeWidth) * this.scaleX + padding * 2; this.currentHeight = (this.height + strokeWidth) * this.scaleY + padding * 2; + //If width is negative, make postive. Fixes path selection issue + if(this.currentWidth < 0){ + this.currentWidth = Math.abs(this.currentWidth); + } + this._hypotenuse = Math.sqrt( Math.pow(this.currentWidth / 2, 2) + Math.pow(this.currentHeight / 2, 2));