Repository navigation
Artboards: Rearrange and Select All on Active Artboard measure a symbol instance by its art - #2614
Merged
bflatastic merged 1 commit intoOct 17, 2026
Conversation
4 tasks done
…ol instance by its art Rearrange and Select › All on Active Artboard measured a symbol instance as its transform applied to the 20 × 20 square around the symbol's origin, not by the symbol's art. An instance whose art lies away from that square moved with, or was selected on, the artboard the square was on. Convert to Artboards, Transform Each, Lock and Hide › All Artwork Above, Paste and Place from Library at a point, and the clipboard imports measured the instance the same way, as did Copy and Cut when they recorded the source artboard and library.add when it sized a graphic. These commands now measure an instance by its art through Document::symbol_boxes, as Document::art_on_artboard, Fit to Artwork Bounds and the Align commands do. Clipboard::bounds measures with the symbols the clipboard holds. clipboard.exportPng, clipboard.exportPdf and the PNG and PDF that Copy offers other apps are now cropped to the instance's art. Docs: docs/mcp.md.
bflatastic
force-pushed
the
fix/artboard-art-symbol-bounds
branch
from
October 17, 2026 10:12
9a011a8 to
67b47c7
Compare
Member
|
Thanks @dotCooCoo, merged. It went through the full gate (fmt, clippy, tests, layers, wasm) in a batch with the other PRs landed today. |
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 and why
On
main, Object › Artboards › Rearrange All Artboards and Select › All on Active Artboard measure a symbol instanceas its transform applied to the 20 × 20 square around the symbol's origin, not by the symbol's art. Place an instance
of a symbol whose art lies away from its origin so that the art is on artboard 2 and the square is on artboard 1:
Rearrange moves the instance with artboard 1, and All on Active Artboard selects it on artboard 1 and not on
artboard 2. Convert to Artboards, Transform Each, Lock and Hide › All Artwork Above, Paste and Place from Library at a
point, and the
clipboard.import*commands measure the instance the same way, as do Copy and Cut when they record thesource artboard and
library.addwhen it sizes a graphic.These commands now measure an instance by its art through
Document::symbol_boxes, asDocument::art_on_artboard(
crates/doc/src/lib.rs:1303), Fit to Artwork Bounds and the Align commands do.Clipboard::boundsuses thesymbols the clipboard holds.
clipboard.exportPng,clipboard.exportPdfand the PNG and PDF that Copy offers otherapps are now cropped to the instance's art.
docs/mcp.mdlists the commands.How it was tested
Ten new tests in
tests_symbolboundsrun Rearrange, All on Active Artboard, Convert to Artboards, Transform Each,Lock and Hide › All Artwork Above, Copy, Paste in Place, Paste at a point,
clipboard.importSvg,clipboard.exportPng,library.addandlibrary.useon an instance whose art lies away from its symbol's origin.With every changed measurement put back to the square, the ten tests fail and the 15 older ones in the file pass.
Targeted checks:
cargo clippy -p vectorcraft-engine --all-targets -- -D warnings,cargo fmt --all -- --check,CRAFT_FONTS_DIR=<craft-fonts checkout> cargo test -p vectorcraft-engine --lib -- tests_symbolbounds:: tests_menucmds:: tests_clipboard:: tests_clipflavours:: tests_newdoc:: tests_journal:: tests_library:: symbol(221 passed), andcargo xtask brands,layersandassets.On Windows 11 (x86-64) with rustc 1.99.0, on top of
mainat 8bc6532:CRAFT_FONTS_DIR=<craft-fonts checkout> cargo xtask cipasses its 9 steps: 7,374 tests passed, 0 failed, 11 ignored.git merge-treereports no conflicts withmainat 8bc6532. With #2592, the comment above Rearrange's art walk incrates/engine/src/cmd/menucmds.rsconflicts: keep #2592's walk through sublayers and its locked-artboard filter, andthis branch's
symbol_boxesline.Checklist
cargo xtask cipasses (fmt, clippy, tests, assets, brands, layers, wasm).unwrap(),expect(),panic!,unreachable!,todo!orunimplemented!outside tests, and no unchecked indexing on data from files, parameters ormessages. Errors are returned as
Resultand shown to the user(why and how).
ASSETS.md.