From 1d8fc2b23ba419ae765a432d7547cbe6dc8f4bed Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Fri, 27 Feb 2026 16:35:31 -0800 Subject: [PATCH] feat: default selector tool with marquee multi-select, space+drag pan Replace single-click-to-pan with selector as default tool. Left-click-drag on canvas background draws a blue marquee rectangle to select multiple shapes. Shift/Ctrl+click toggles additive selection. Panning now via Space+drag, middle-click, or wheel/trackpad (unchanged). Delete/Backspace removes all selected shapes. folk-shape highlighted state shows blue selection outline. Co-Authored-By: Claude Opus 4.6 --- lib/folk-shape.ts | 8 +- website/canvas.html | 199 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 177 insertions(+), 30 deletions(-) diff --git a/lib/folk-shape.ts b/lib/folk-shape.ts index b84f161..46e5049 100644 --- a/lib/folk-shape.ts +++ b/lib/folk-shape.ts @@ -97,11 +97,15 @@ const styles = css` outline: none; } - :host(:hover), - :host(:state(highlighted)) { + :host(:hover) { outline: none; } + :host(:state(highlighted)) { + outline: 2px solid #3b82f6; + outline-offset: 2px; + } + :host(:state(move)), :host(:state(rotate)), :host(:state(resize-top-left)), diff --git a/website/canvas.html b/website/canvas.html index 016c3e6..a04dceb 100644 --- a/website/canvas.html +++ b/website/canvas.html @@ -442,6 +442,16 @@ overflow: visible; } + #select-rect { + position: fixed; + border: 1.5px solid #3b82f6; + background: rgba(59, 130, 246, 0.08); + border-radius: 2px; + pointer-events: none; + z-index: 9998; + display: none; + } + /* Touch-friendly resize handles */ @media (pointer: coarse) { folk-shape::part(resize-top-left), @@ -840,6 +850,7 @@
+