mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Never return null from #getBounds.
This commit is contained in:
parent
c49a0c6ad4
commit
9d8bf12028
1 changed files with 3 additions and 1 deletions
|
@ -1857,8 +1857,10 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
|||
// http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
|
||||
var segments = this._segments,
|
||||
first = segments[0];
|
||||
// If there are no segments, return "empty" rectangle, just like groups,
|
||||
// since #bounds is assumed to never return null.
|
||||
if (!first)
|
||||
return null;
|
||||
return new Rectangle();
|
||||
var coords = new Array(6),
|
||||
prevCoords = new Array(6);
|
||||
// Make coordinates for first segment available in prevCoords.
|
||||
|
|
Loading…
Reference in a new issue