Improve working with background nodes and new nodes - #63
Merged
Conversation
Background image and text nodes were hard to reach once other nodes covered them, and freshly added text and image nodes were nearly impossible to spot on the canvas. Reaching and ordering nodes: - Add a layers panel listing every node, so a fully covered node can still be selected, zoomed to, locked and reordered - Add bring to front / forward / backward / send to back controls to the node panel and the multi selection panel, backed by a new reorderNodes helper that normalizes the whole stack - Add per node locking that stops a positioned background image from being dragged, selected, cut or deleted by accident, while it stays editable through the layers panel - Alt-click cycles through the nodes stacked under the cursor - Selected nodes are lifted above the stack so the resize handles of a background node stay reachable Seeing new nodes: - Text nodes defaulted to #e5e7eb, a contrast ratio of about 1.2:1 on the default white background; the default now follows the background colour - Empty image and text nodes render a visible dashed placeholder, and image nodes start at a usable size instead of collapsing - Nodes added with a keyboard shortcut got no zIndex at all and rendered below every other node until the map was saved and reloaded; both add paths now share a single createNode helper - New nodes are placed inside the visible canvas rather than the window centre, avoid the open side panel, cascade instead of stacking on each other, and are selected on creation Other fixes: - Text nodes can be edited in place with a double-click - A rotated text node sized its hit box to the unrotated text, so clicks landed next to the glyphs; the wrapper now matches the rotated bounds - Undo, copy, paste and delete were disabled whenever a node was selected, because selecting one opens the editor panel and the shortcut handler bailed out on any open panel; it now only steps aside while the user is typing Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qfk61fYbS3FP9MWE9e42WW
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Background image and text nodes were hard to reach once other nodes
covered them, and freshly added text and image nodes were nearly
impossible to spot on the canvas.
Reaching and ordering nodes:
still be selected, zoomed to, locked and reordered
node panel and the multi selection panel, backed by a new reorderNodes
helper that normalizes the whole stack
being dragged, selected, cut or deleted by accident, while it stays
editable through the layers panel
background node stay reachable
Seeing new nodes:
default white background; the default now follows the background colour
image nodes start at a usable size instead of collapsing
below every other node until the map was saved and reloaded; both add
paths now share a single createNode helper
centre, avoid the open side panel, cascade instead of stacking on each
other, and are selected on creation
Other fixes:
landed next to the glyphs; the wrapper now matches the rotated bounds
selected, because selecting one opens the editor panel and the shortcut
handler bailed out on any open panel; it now only steps aside while the
user is typing
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01Qfk61fYbS3FP9MWE9e42WW