feat: allow manual editing of board size and offset via Edit Board mode#718
Open
victorjzq wants to merge 1 commit intotscircuit:mainfrom
Open
feat: allow manual editing of board size and offset via Edit Board mode#718victorjzq wants to merge 1 commit intotscircuit:mainfrom
victorjzq wants to merge 1 commit intotscircuit:mainfrom
Conversation
…cit dimensions When a pcb_board element has explicit width/height (no outline polygon), an "Edit Board" button appears in the toolbar. Clicking it enters edit board mode, which renders a blue outline with 8 resize handles around the board. Users can drag the board body to offset its center, or drag any handle to resize width and height. Board edit events (edit_pcb_board_size) are applied locally in PCBViewer before delegating standard edit events to applyEditEvents from core.
|
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.
/claim #106
Changes
in_edit_board_modestate to global store with"edit_board"mode insetEditModeEditBoardOverlaycomponent that wraps the canvas and shows a blue border + 8 resize handles when a board with explicitwidth/heightis presentwidth/heightaccordingly"Edit Board"button toToolbarOverlay(only shown when board has explicit width/height, not an outline polygon)edit_pcb_board_sizeevents locally inPCBViewerbefore delegating toapplyEditEventsfrom core (core does not yet model board edit events)edit-board.fixture.tsxdemo fixtureHow it works
width/height→ "Edit Board" button appears in toolbarwidth/heightwhile keeping opposite edge fixedTest
All 20 existing tests pass (
bun test). Build and type check clean (bun run build,npx tsc --noEmit).