mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -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 = [],
|
values2 = [],
|
||||||
arrays = [],
|
arrays = [],
|
||||||
locations,
|
locations,
|
||||||
path;
|
current;
|
||||||
// Cache values for curves2 as we re-iterate them for each in curves1.
|
// Cache values for curves2 as we re-iterate them for each in curves1.
|
||||||
for (var i = 0; i < length2; i++)
|
for (var i = 0; i < length2; i++)
|
||||||
values2[i] = curves2[i].getValues(matrix2);
|
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
|
// use separate location arrays per path1, to make sure the
|
||||||
// circularity checks are not getting confused by locations on
|
// circularity checks are not getting confused by locations on
|
||||||
// separate paths. We are flattening the separate arrays at the end.
|
// separate paths. We are flattening the separate arrays at the end.
|
||||||
if (path1 !== path) {
|
if (path1 !== current) {
|
||||||
path = path1;
|
current = path1;
|
||||||
locations = [];
|
locations = [];
|
||||||
arrays.push(locations);
|
arrays.push(locations);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue