Only preserve angle in Point#normalize() if direction doesn't change.

This commit is contained in:
Jürg Lehni 2014-02-20 02:51:02 +01:00
parent 86e4d2a6b9
commit e54691214a

View file

@ -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;
},