feat: Scribbble-style tools — shapes, keyboard shortcuts, bigger palette#7
Closed
ajianaz wants to merge 1 commit into
Closed
feat: Scribbble-style tools — shapes, keyboard shortcuts, bigger palette#7ajianaz wants to merge 1 commit into
ajianaz wants to merge 1 commit into
Conversation
…r palette Added tools: - Line (L) — straight line from drag - Arrow (A) — line with arrowhead, auto-sized to brush width - Rectangle (R) — stroke rectangle from drag - Ellipse (O) — stroke ellipse from drag Keyboard shortcuts (when draw mode ON): - P/H/L/A/R/O/E — switch tools - 1-7 — quick color select (red/orange/yellow/green/blue/purple/white) - +/- — brush thickness - Cmd+Z — undo - Cmd+K — clear all Toolbar improvements: - 7 colors (was 4) — added orange, blue, purple - Brush size control with − and + buttons + live readout - Shape tools render as stroke preview during drag - Tool shortcut letters shown in tooltips - Active tool highlight uses brand orange (#EF593F) Shape rendering: - Shapes store only start+end points (not full path) - Arrow head length scales with brush width - Ellipse uses center+radius from bounding box - Shapes render in redraw loop alongside freehand strokes Inspired by: Scribbble (scribbble.app), DrawPen (drawpen.app)
Contributor
Author
|
Closing for now — depends on draw-mode toggle (PR 6) to be reachable. Will reopen rebased. |
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.
What's New
Adopted patterns from Scribbble (scribbble.app) and DrawPen (drawpen.app) — the two leading open-source screen annotation apps.
New Drawing Tools (4)
LAROShapes store only start+end points → crisp rendering at any zoom. Arrow head scales with brush width.
Keyboard Shortcuts (draw mode ON)
PHLAROE1–7+/-⌘Z⌘KToolbar Improvements
#EF593F)Technical
Tooltype extended:'line' | 'arrow' | 'rectangle' | 'ellipse'drawShape()handles all 4 shape types in both commit + preview modedrawArrowHead()computes arrowhead from brush widthFiles Changed
src/lib/types.ts— Tool type + shapessrc/lib/Toolbar.svelte— 7 tools, 7 colors, brush size, shortcut hintssrc/routes/+page.svelte— shape rendering, keyboard handler, shape previewCheck