From 4a51211df95cc392c989fc01a38249dae074cdd6 Mon Sep 17 00:00:00 2001 From: Victor Oliveira Date: Mon, 22 Sep 2014 11:12:22 -0300 Subject: [PATCH] Fix setCoords for negative width and/or height Change-Id: I8ddb8ad49325e593bff15396f76623351e2c5de4 --- src/mixins/object_geometry.mixin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mixins/object_geometry.mixin.js b/src/mixins/object_geometry.mixin.js index f47704f3..1bddeca6 100644 --- a/src/mixins/object_geometry.mixin.js +++ b/src/mixins/object_geometry.mixin.js @@ -323,10 +323,10 @@ h = strokeWidth; } if (strokeW) { - w += strokeWidth; + w += w > 0 ? strokeWidth : -strokeWidth; } if (strokeH) { - h += strokeWidth; + h += h > 0 ? strokeWidth : -strokeWidth; } this.currentWidth = w * this.scaleX; this.currentHeight = h * this.scaleY;