Fix deduplication
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
parent
5081abdde1
commit
8cc8367335
@ -377,7 +377,7 @@ export const isPointInElement = (
|
|||||||
const intersections = intersectElementWithLineSegment(
|
const intersections = intersectElementWithLineSegment(
|
||||||
element,
|
element,
|
||||||
intersector,
|
intersector,
|
||||||
).filter((item, pos, arr) => arr.indexOf(item) === pos);
|
).filter((p, pos, arr) => arr.findIndex((q) => pointsEqual(q, p)) === pos);
|
||||||
|
|
||||||
return intersections.length % 2 === 1;
|
return intersections.length % 2 === 1;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user