Skip to content

Commit 0174b94

Browse files
committed
avoid rendering twice in the case where ii==null and !pool
1 parent 8e7f034 commit 0174b94

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/interactions/pointer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ function pointerK(kx, ky, {x, y, px, py, maxRadius = 40, channels, render, ...op
8181
// render; although when hiding, we render immediately.
8282
const pool = state.pool ?? facetPool;
8383
function update(ii, ri) {
84-
if (ii == null) render(ii);
8584
if (!pool) return void render(ii);
85+
if (ii == null) render(ii);
8686
pool.set(renderIndex, {ii, ri, render});
8787
if (pool.frame !== undefined) cancelAnimationFrame(pool.frame);
8888
pool.frame = requestAnimationFrame(() => {

0 commit comments

Comments
 (0)