Repository navigation
Brush ink, highlighter, and Blender-style image links for annotations - #68
Merged
Merged
Conversation
Annotate gains a Brush and a Highlighter that draw non-destructive ink items above images and notes: pressure- and speed-shaped tapered strokes (real pen pressure when available), strokes written together merge into one item, and the highlighter blends multiply plus a faint screen pass so text under it stays crisp on light and dark images. Arrows get a tapered shaft, a swept head and a contrast outline. Dragging from one image or note onto another makes a link drawn like a Blender node link: square to each edge, spread along shared edges, re-routed every frame so it follows moves, resizes, rotation, undo and reopen. Link ends unplug and re-plug by dragging; deleting an item deletes its links. A selection bar section restyles annotations (colour, width, solid/dotted, heads, outline) as one undo step. Annotation tools keep their own screen-relative widths. Double-clicks with an annotation tool or on an annotation no longer refit the view. Geometry lives in scripts/annotation-geometry.mjs with unit tests; smoke-annotations drives the whole flow with real mouse input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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 changes
Brush and Highlighter (Draw → Annotate)
Arrows
Selection bar: colour swatches, thinner/thicker, solid/dotted, arrowheads (end/both/none), contrast outline, each one undo step.
Fix: double-click with an annotation tool, or on an annotation, no longer refits the view.
Behaviour changes
smoke-image-edit-isolationnow asserts the arrow's own 3px width; its intent (never the eraser width) is unchanged.Tests
scripts/test-annotation-geometry.mjs(innpm test): stroke outlines, taper, link sides/sockets/curves, socket spreading, pressure, halo colour, build wiring.scripts/smoke-annotations.mjs(test:annotations-smoke, CI step): real CDP mouse input for writing, highlighter, link create/move/unplug/re-plug/delete+undo, restyle+undo, hit tests, double-tap guard, save/reopen. The double-tap assertion was checked to fail with the guard removed.🤖 Generated with Claude Code