Skip to content

Commit 4a80eb0

Browse files
authored
fix a corner case where pointer interaction generates two points
1 parent 194e1f4 commit 4a80eb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interactions/pointer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ function pointerK(kx, ky, {x, y, px, py, maxRadius = 40, channels, render, ...op
8484
facetState.set(index.fi, ri);
8585
f = requestAnimationFrame(() => {
8686
f = null;
87-
for (const r of facetState.values()) {
88-
if (r < ri) {
87+
for (const [fi, r] of facetState) {
88+
if (r < ri || (r === ri && fi < index.fi)) {
8989
ii = null;
9090
break;
9191
}

0 commit comments

Comments
 (0)