Skip to content

Feat/lasso worldspace and toolbar polish - #138

Merged
harleensachdev merged 14 commits into
BodyMaps:mainfrom
harleensachdev:feat/lasso-worldspace-and-toolbar-polish
Aug 13, 2026
Merged

Feat/lasso worldspace and toolbar polish#138
harleensachdev merged 14 commits into
BodyMaps:mainfrom
harleensachdev:feat/lasso-worldspace-and-toolbar-polish

Conversation

@harleensachdev

@harleensachdev harleensachdev commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes zoom/pan drift in the annotation tools (lasso, scissors, smart
fill, level tracing) by storing interaction points in world space
instead of canvas pixels, adds sub-voxel accuracy to the live-wire
edge snap, and polishes the annotation toolbar's onboarding and
visual connection to the Annotate button.

Bug fixes

  • Lasso/scissors polygon points and smart-fill scribble dots now
    stored in world space (mm) instead of canvas pixels, so they no
    longer drift off the anatomy when zooming/panning mid-draw
  • Level tracing's cached preview outline re-derives immediately on
    zoom instead of waiting for the next mousemove
  • Segments popup now defaults to the Existing tab instead of falling
    back to Custom
  • Crosshair tool no longer stays armed and interactive underneath
    lasso/scissors/level-tracing clicks
  • Annotate toolbar close now resets the active target class and tool,
    instead of leaving them lingering invisibly
  • Toolbar intro hints (walkthrough, first-target hint) now use
    sessionStorage instead of localStorage, so they reappear each
    session rather than being dismissed forever
  • Fixed a double-toggle race where clicking the flyout arrow to close
    an already-open panel appeared to do nothing on the first press

New features / polish

  • Sub-voxel gradient-based edge snap for the live-wire tool — corrects
    a systematic inward bias on curved boundaries from the raw
    grid-locked Dijkstra path
  • "Click here to close the lasso" hint that fades in near the closing
    anchor, plus a matching highlight on the anchor dot itself
  • Crosshair now jumps to a segment's centroid when it's selected
    (matches the sidebar's existing jump-to-organ behavior)
  • First-use keyboard shortcuts popup shown when the annotation
    toolbar opens
  • One-time Continue/Start over/Exit explainer the first time a guided
    flow (Grow from Seeds, Copy/Fill across slices, Islands) surfaces
    those controls
  • Annotation ribbon now visually branches off the Annotate button via
    a clip-path circle reveal with a matching pointer arrow, instead of
    a flat fade-in
  • Flyout panels now show a pointer arrow connecting back to the icon
    that opened them
  • Main topbar dims while the annotation ribbon is open, to focus
    attention on it

Testing

  • Verified lasso/scissors polygon holds its shape through zoom/pan
  • Verified live-wire snap accuracy on curved boundaries
  • Verified Segments popup opens on the Existing tab
  • Verified crosshair disables under lasso/scissors/level-tracing
  • Verified crosshair jumps to centroid on segment select
  • Manual click-through of shortcuts popup and guided-flow hints
  • Verified flyout arrow closes an open panel on first click

harleensachdev and others added 14 commits August 13, 2026 12:40
Adds canvasPointToWorld/worldToCanvasPoint so points can be stored
in world space (mm) instead of camera-dependent canvas pixels,
preventing drift on zoom/pan. Also refines the live-wire Dijkstra
path with a sub-voxel gradient-peak snap: the raw grid-locked path
was biased toward the inside of intensity transitions on convex
boundary stretches; this walks along the local gradient and
locates the true edge with a parabolic sub-voxel fit.
…pixels

Prevents lasso/scissors corners and fill path from drifting off
the anatomy when the user zooms or pans mid-draw.
Same drift issue as the lasso/scissors fix, applied to the
foreground/background scribble markers.
Adds cameraVersion param so the cached preview outline refreshes
immediately on zoom instead of waiting for the next mousemove.
Also adds a fading 'click here to close the lasso' nudge shown
the first time the cursor gets within closing range of the
polygon's first point.
Popup previously fell back to the Custom tab whenever no catalog
organ was already active.
Directs visual focus to the open ribbon instead of two
equally-loud toolbars competing for attention.
…eveal

- Shows a first-use shortcuts card when the annotation toolbar opens
- Shows a one-time Continue/Start over/Exit explainer the first time
  a guided flow (Grow from Seeds, Copy/Fill-across-slices, Islands)
  surfaces those controls
- Swaps localStorage for sessionStorage on these intro hints so they
  reappear each session instead of being dismissed forever
- Ribbon now visually branches off the Annotate button via a
  clip-path circle reveal with a matching pointer triangle
… click

Adds a Hopkins-blue pointer connecting each flyout panel back to
the ribbon icon it opened from. Also stops a mousedown race where
clicking the arrow to close an already-open flyout appeared to do
nothing on the first press.
@harleensachdev
harleensachdev merged commit 014f32c into BodyMaps:main Aug 13, 2026
8 checks passed
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