fix(tools): let widgets handle a press before the select tool picks - #947
Open
PaulHax wants to merge 2 commits into
Open
fix(tools): let widgets handle a press before the select tool picks#947PaulHax wants to merge 2 commits into
PaulHax wants to merge 2 commits into
Conversation
✅ Deploy Preview for volview-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
PaulHax
force-pushed
the
ruler-selection-guard
branch
from
September 11, 2026 16:29
ea6a246 to
302f1d4
Compare
PaulHax
force-pushed
the
ruler-selection-guard
branch
from
September 11, 2026 16:42
302f1d4 to
4764eb4
Compare
The select tool's press handler runs ahead of the annotation widgets and resolves its own pick at the press position. That pick clears the widget manager's standing selections before the widgets handle the same press, and the ruler reads those selections to tell a handle from its line, so pressing a hovered ruler or rectangle handle with any non-placing tool threw. The throw also skipped the interactor's button bookkeeping, so every pointer move with the button held re-fired the press. Yield a microtask before picking so the widgets see the standing pick they hovered with. The handler stays registered ahead of the widgets so a widget consuming the press cannot skip selection, and the pick still resolves at the press position.
Drag a ruler and a rectangle handle, click a ruler's line and drag a polygon's edge with the select tool. The drags must move the handle with no application error, and the line and edge presses must select the annotation without moving a handle.
PaulHax
force-pushed
the
ruler-selection-guard
branch
from
September 11, 2026 20:09
4764eb4 to
43e4b7d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The select tool's press pick cleared the widget manager's selections before the annotation widgets handled the same press, so pressing a ruler or rectangle handle threw, and ruler line or polygon edge presses moved a handle. Defer the pick until the widgets have run.
Bug repo:
Open https://volview.kitware.app/ and load any image. A sample CT from the Data panel works.
Pick the Ruler tool from the toolbar and click twice in the axial view to place a ruler.
Switch to the Select tool (the arrow icon). Window/level, pan or zoom also work: any tool except ruler, rectangle and polygon.
Move the mouse onto one of the ruler's endpoints and wiggle it slightly until the cursor turns into a pointer. The first move after the mouse sits still doesn't register as a hover, so the wiggle matters.
Press the left button and drag.