Skip to content

fix(tools): pick the annotation under the press position - #930

Merged
PaulHax merged 1 commit into
Kitware:mainfrom
PaulHax:annotation-select-press-pick
Aug 27, 2026
Merged

fix(tools): pick the annotation under the press position#930
PaulHax merged 1 commit into
Kitware:mainfrom
PaulHax:annotation-select-press-pick

Conversation

@PaulHax

@PaulHax PaulHax commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Selection read the widget manager's standing pick, which is whatever its last tracked mouse move resolved. Pick at the press coordinates instead.

E2E covers it, with a control case that passes on main so the new test is known to discriminate.

@netlify

netlify Bot commented Aug 27, 2026

Copy link
Copy Markdown

Deploy Preview for volview-dev ready!

Name Link
🔨 Latest commit c71c0e2
🔍 Latest deploy log https://app.netlify.com/projects/volview-dev/deploys/6a908debc0ece400088872ab
😎 Deploy Preview https://deploy-preview-930--volview-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@PaulHax
PaulHax force-pushed the annotation-select-press-pick branch from 7471ba1 to 2dce742 Compare August 27, 2026 18:43
@PaulHax
PaulHax added this pull request to the merge queue Aug 27, 2026
@PaulHax
PaulHax removed this pull request from the merge queue due to a manual request Aug 27, 2026
getSelectedData returns the widget manager's standing pick, resolved by
its last tracked mouse move. That pick is empty while a buffer capture is
in flight, and it sits at the coordinates of that move rather than the
press, so a press could select an annotation the pointer had left or
clear the selection instead of making one. A move that vtk.js reports as
StartMouseMove is not tracked at all, so the pointer can leave an
annotation while the pick stays on it.

Resolve the pick at the press coordinates instead. The handler becomes
async, which leaves propagation unchanged since only a return of
EVENT_ABORT counts as handled.

This also settles the macOS E2E failures in
delete-selected-annotation.e2e.ts, where a press that lands on a stale
empty pick never recovers: the retry presses at the position the pointer
already holds, so no further move is dispatched and no new pick is
resolved.
@PaulHax
PaulHax force-pushed the annotation-select-press-pick branch from 2dce742 to c71c0e2 Compare August 27, 2026 19:20
@PaulHax
PaulHax enabled auto-merge August 27, 2026 19:20
@PaulHax
PaulHax added this pull request to the merge queue Aug 27, 2026
Merged via the queue into Kitware:main with commit 5db8412 Aug 27, 2026
8 checks passed
@PaulHax
PaulHax deleted the annotation-select-press-pick branch August 27, 2026 19:25
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.

1 participant