Skip to content

feat: choose click selection by stroke or bounding box - #14

Open
inzuno wants to merge 2 commits into
SJLS27:mainfrom
inzuno:click-selection-option
Open

inzuno wants to merge 2 commits into
SJLS27:mainfrom
inzuno:click-selection-option

Conversation

@inzuno

@inzuno inzuno commented Dec 2, 2026 •

Copy link
Copy Markdown

Problem

When a large shape or group (for example a long stem grouped with its engraved label) has a bounding box that covers smaller shapes, clicking one of the small shapes selects the large one instead. Nesting parts tightly on a sheet becomes very hard: the only workaround is to move the large shape away, select the small one, then move the large shape back.

Change

New Click select preference in Settings → General:

  • On the line — new default. Enables Fabric's perPixelTargetFind with a 5 px tolerance, so a click only picks a shape when it lands on its drawn pixels (strokes, fills, text). Empty space inside a shape's bounding box passes through to the shape underneath.
  • Inside the bounding box — the previous behaviour, for users who prefer it.

The choice applies immediately (no restart) and is remembered in localStorage (openburn.clickSelection). Marquee selection is unchanged.

Happy to flip the default to the old behaviour if you prefer.

Testing

  • npm run typecheck and the full unit suite pass; new tests cover the preference's default, persistence and invalid stored values.
  • Manually tested on Windows 10 with a Sculpfun S30 Ultra project: small parts inside a grouped stem's bounding box are now selectable, and switching back to "Inside the bounding box" restores the old behaviour.

A large shape or group whose bounding box covers smaller shapes swallowed
clicks aimed at them, which made nesting parts on a sheet very hard.

Add a "Click select" preference (Settings > General):
- "On the line", the new default: Fabric per-pixel
  target find with a 5 px tolerance, so a click only picks a shape when it
  lands on its strokes, fills or text; empty space inside a bounding box
  passes through to the shape underneath.
- "Inside the bounding box": the previous behaviour.

The choice applies immediately and is remembered in localStorage
(openburn.clickSelection). Marquee selection is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ay6UUMKQbnKEyEAJkdon1d
@inzuno
inzuno force-pushed the click-selection-option branch from b5f0e62 to ec42a43 Compare December 2, 2026 13:36
With "On the line" click selection (the new default), a click in the empty
inside of an unfilled rectangle no longer selects it, so the node editing
tests clicked through and never got a path. Click the rectangle's left edge
instead, which selects it in both click selection modes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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