mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -05:00
Fix problem with Point constructor when passed { angle: 0, length: n }, by checking for undefined.
This commit is contained in:
parent
2a9bbd3dee
commit
bd59e48682
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ var Point = this.Point = Base.extend({
|
|||
} else if (Array.isArray(arg0)) {
|
||||
this.x = arg0[0];
|
||||
this.y = arg0.length > 1 ? arg0[1] : arg0[0];
|
||||
} else if (arg0.angle) {
|
||||
} else if (arg0.angle !== undefined) {
|
||||
this.x = arg0.length;
|
||||
this.y = 0;
|
||||
this.setAngle(arg0.angle);
|
||||
|
|
Loading…
Reference in a new issue