Skip to content

Respect pointer pooling per mark - #2490

Open
pcbeingused33 wants to merge 2 commits into
observablehq:mainfrom
pcbeingused33:fix/pointer-pool-2475
Open

pcbeingused33 wants to merge 2 commits into
observablehq:mainfrom
pcbeingused33:fix/pointer-pool-2475

Conversation

@pcbeingused33

Copy link
Copy Markdown

Fixes case 2 of #2475 (a later mark's pool: false is ignored). Case 1 (a pointer that picks nothing outranking a real pick) is not addressed here, so the issue should stay open.

The first pointer mark to render determines whether the plot has a shared pool. That makes later marks inherit its pooling setting and can hide a highlight configured with pool: false.

Choose the pool for each mark when it renders. Marks with pooling enabled lazily create or reuse the shared pool. Independent marks retain their per-mark facet pool when faceted.

The regression test exercises both render orders and expects an independent highlight alongside a single tooltip from two competing tips. Run it with pnpm exec vitest run test/pointer-test.js.

This change was prepared with AI assistance.

pcbeingused33 and others added 2 commits December 1, 2026 03:30
A pointer that picks nothing is removed from the pool instead of competing with maxRadius², so it can no longer hide a real pick (case 1 of observablehq#2475).

This also restores the 0.6.17 facet behavior: the value resets to null on pointerleave, and the winning pick renders last so that a losing pointer cannot overwrite the dispatched value with null.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants