Repository navigation
Artboards: art centered on an artboard's right or bottom edge is on that artboard - #2637
Merged
Merged
Conversation
4 tasks done
…hat artboard Rearrange All Artboards, Select › All on Active Artboard (for objects with no area), Copy's source artboard for Paste in Place, Align to Artboard without an index, Crop Image, the Crop Image tool, Place with `at`, CSS positions and a filter plug-in's artboard decided whether a point or an object's center is on an artboard with Rect::contains, which leaves out the right and bottom edges. A line along an artboard's right or bottom edge was on no artboard: Rearrange left it behind, and All on Active Artboard did not select it. Document::art_on_artboard counts art flush with those edges (storytold#890). They now count the edges as art_on_artboard does, within a millionth of a point. On an edge two artboards share, the artboard to the right of it or below it still holds the point. All on Active Artboard selects a line on a shared edge from either artboard. A press exactly on a right or bottom edge now picks that artboard, and the Artboard tool's cursor shows Move there.
… holds On an edge two artboards share, the artboard to the right of it or below it holds a point, except at the end of the edge that lies on that artboard's bottom or right edge, such as where both artboards' bottom edges meet. There the first artboard holds it, or the last when topmost. The doc comment and the test comments now say so, and the test asserts that corner.
bflatastic
force-pushed
the
fix/art-on-artboard-edge
branch
from
October 17, 2026 10:15
52e1018 to
24b6486
Compare
bflatastic
added a commit
to dotCooCoo/vectorcraft
that referenced
this pull request
Oct 17, 2026
Member
|
Thanks @dotCooCoo, merged, including your doc-comment and shared-corner test commit. It met #2614 in Rearrange and Select All on Active Artboard: symbol instances are measured by their art and the artboard is found with your |
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
Make two artboards side by side, draw a vertical line along the right edge of the second one, and run Object ›
Artboards › Rearrange All Artboards… with Arrange by Row and Change to Right-to-Left Layout. On
mainboth artboardsmove and the line stays behind. A line along an artboard's bottom edge stays behind too, and Select › All on Active
Artboard selects neither line.
Rearrange, All on Active Artboard (for objects with no area), Paste in Place's source artboard, Align to Artboard
without an index, Crop Image and its tool,
file.placewithat, CSS positions, a filter plug-in's artboard and theArtboard tool decide whether a point is on an artboard with
Rect::contains, which leaves out the right and bottomedges.
Document::art_on_artboardcounts art flush with those edges (#890).They now use that rule, edges included, within a millionth of a point (
artboard_holdsandDocument::artboard_holding). On an edge two artboards share, the artboard to the right of it or below it still holdsthe point, except at an end of the edge that lies on that artboard's own bottom or right edge; there the first
artboard holds it. All on Active Artboard now selects a line on a shared edge from either artboard. A press exactly on a right
or bottom edge picks that artboard.
How it was tested
Seven new tests cover the change:
tests::artboard_at_counts_the_right_and_bottom_edges(doc), and Rearrange, All onActive Artboard, Paste in Place, placed type, CSS positions and the Artboard tool's cursor and click in
tests_newdoc,tests_menucmds,tests_clipboard,tests_textimport,css_rulesandxform::artboard.With the call sites reverted to
main's containment check, all seven fail. Targeted checks: clippy with-D warningson the doc, svg, tools and engine crates,
cargo fmt --all -- --check, the doc and tools tests (213 and 376 passed),css_rules(9 passed), 216 engine tests, 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,371 tests passed, 0 failed, 11 ignored.git merge-treereports no conflicts withmainat 49bdc5c; on that merge,cargo check --workspace --tests, thexform::artboardtests (13 passed),cargo xtask brandsandcargo xtask cursorspass. It conflicts with #2614 on the Rearrange and All on ActiveArtboard lines; the resolution keeps #2614's measurement and this branch's edge check. It conflicts with #2592 and #2497
on the Artboard tool's cursor line. #2592's version already calls
artboard_at. For #2497, the resolution is!m.shift && cx.doc.artboard_at(p).is_some().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.