From e54691214a1fc7d155a2ec56ab185a23370c0598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 20 Feb 2014 02:51:02 +0100 Subject: [PATCH] Only preserve angle in Point#normalize() if direction doesn't change. --- src/basic/Point.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/basic/Point.js b/src/basic/Point.js index 1b325ad1..cbde7e87 100644 --- a/src/basic/Point.js +++ b/src/basic/Point.js @@ -515,7 +515,8 @@ var Point = Base.extend(/** @lends Point# */{ scale = current !== 0 ? length / current : 0, point = new Point(this.x * scale, this.y * scale); // Preserve angle. - point._angle = this._angle; + if (scale >= 0) + point._angle = this._angle; return point; },