mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Fix handling of self-intersection in PathItem#getIntersections
Closes #1194
This commit is contained in:
parent
1e9b1cd7dc
commit
f995216f39
1 changed files with 3 additions and 3 deletions
|
@ -336,7 +336,7 @@ var PathItem = Item.extend(/** @lends PathItem# */{
|
|||
values2 = [],
|
||||
arrays = [],
|
||||
locations,
|
||||
path;
|
||||
current;
|
||||
// Cache values for curves2 as we re-iterate them for each in curves1.
|
||||
for (var i = 0; i < length2; i++)
|
||||
values2[i] = curves2[i].getValues(matrix2);
|
||||
|
@ -348,8 +348,8 @@ var PathItem = Item.extend(/** @lends PathItem# */{
|
|||
// use separate location arrays per path1, to make sure the
|
||||
// circularity checks are not getting confused by locations on
|
||||
// separate paths. We are flattening the separate arrays at the end.
|
||||
if (path1 !== path) {
|
||||
path = path1;
|
||||
if (path1 !== current) {
|
||||
current = path1;
|
||||
locations = [];
|
||||
arrays.push(locations);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue