mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-22 07:19:57 -05:00
Improve Error message thrown when no arc can be drawn.
This commit is contained in:
parent
8454709559
commit
c2d425c916
1 changed files with 2 additions and 3 deletions
|
@ -1544,9 +1544,8 @@ var Path = this.Path = PathItem.extend({
|
||||||
// Otherwise we bail out:
|
// Otherwise we bail out:
|
||||||
if (!side)
|
if (!side)
|
||||||
return this.lineTo(to);
|
return this.lineTo(to);
|
||||||
throw new Error(
|
throw new Error("Cannot put an arc through the given points: "
|
||||||
"Cannot put an arc through the given points: "
|
+ [from, through, to]);
|
||||||
+ Array.prototype.join.call(arguments));
|
|
||||||
}
|
}
|
||||||
var vector = from.subtract(center),
|
var vector = from.subtract(center),
|
||||||
radius = vector.getLength(),
|
radius = vector.getLength(),
|
||||||
|
|
Loading…
Reference in a new issue