Skip to content

feat(editor): the layer you pick up comes to the top - #66

Merged
tobi merged 1 commit into
tobi:mainfrom
jondkinney:feat/layer-order
Aug 21, 2026
Merged

feat(editor): the layer you pick up comes to the top#66
tobi merged 1 commit into
tobi:mainfrom
jondkinney:feat/layer-order

Conversation

@jondkinney

Copy link
Copy Markdown
Contributor

Stacked on #65, whose shared hit-testing this uses. The diff below has that commit in it; only the second one is this PR. I'll rebase once it lands.

Layers stacked in the order you drew them and nothing but redrawing could change it, so a text label that ended up under an arrow stayed there.

Picking a layer up raises it now, from any tool, as its own undo step. Text and counters are painted after everything else regardless: a label buried under a shape is a label nobody can read, and the number pointing at it belongs above even that. The hit test walks the same order as the painter, so what you click is what you can see.

runLayerOrderSmoke (exit 122): a layer drawn first and then picked up covers one drawn later, the raise is a single undo step, and text over a shape stays legible in the export whatever order they were drawn in. That check uses a shape painted in the same pass on purpose, since a redaction would have passed regardless of ordering.

Layers stacked in the order they were drawn, and nothing but redrawing
could change it, a text under an arrow stayed under it. Picking a layer
up now raises it, from any tool, as its own undo step. Text and counters
are painted after everything else regardless: a label buried under a
shape is a label nobody can read, and the number pointing at it belongs
above even that. The hit test walks the same order, so what you click is
what you see on top.
@tobi
tobi force-pushed the feat/layer-order branch from 7749755 to 2652c00 Compare August 21, 2026 23:38
@tobi
tobi merged commit e20f6b0 into tobi:main Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants