mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Only preserve angle in Point#normalize() if direction doesn't change.
This commit is contained in:
parent
86e4d2a6b9
commit
e54691214a
1 changed files with 2 additions and 1 deletions
|
@ -515,7 +515,8 @@ var Point = Base.extend(/** @lends Point# */{
|
||||||
scale = current !== 0 ? length / current : 0,
|
scale = current !== 0 ? length / current : 0,
|
||||||
point = new Point(this.x * scale, this.y * scale);
|
point = new Point(this.x * scale, this.y * scale);
|
||||||
// Preserve angle.
|
// Preserve angle.
|
||||||
point._angle = this._angle;
|
if (scale >= 0)
|
||||||
|
point._angle = this._angle;
|
||||||
return point;
|
return point;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue