Skip to content

Commit ed914e9

Browse files
committed
avoid rendering twice in the case where ii==null and !pool
1 parent 2c8922a commit ed914e9

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
@@ -82,8 +82,8 @@ function pointerK(kx, ky, {x, y, px, py, maxRadius = 40, channels, render, ...op
8282
// render; although when hiding, we render immediately.
8383
const pool = state.pool ?? facetPool;
8484
function update(ii, ri) {
85-
if (ii == null) render(ii);
8685
if (!pool) return void render(ii);
86+
if (ii == null) render(ii);
8787
pool.set(renderIndex, {ii, ri, render});
8888
if (pool.frame !== undefined) cancelAnimationFrame(pool.frame);
8989
pool.frame = requestAnimationFrame(() => {

0 commit comments

Comments
 (0)