Skip to content

fix(diagram): extend keeps stretched children inside the container's padding - #217

Open
ionos-landgraf-vin wants to merge 1 commit into
mainfrom
fix/extend-inner-width
Open

ionos-landgraf-vin wants to merge 1 commit into
mainfrom
fix/extend-inner-width

Conversation

@ionos-landgraf-vin

Copy link
Copy Markdown
Collaborator

Problem

When a container with several children (a stack/layer) is grown by `extend`, the cross-axis branch of `Expander#expand` passed the container's full outer size to its children. They ended up flush on its border instead of inside its padding. The single-child branch already subtracted the inset.

Fix

Pass the inner size (target minus padding and, on the height axis, the title bar) and centre the children on the inner area. `stretch_children` (main axis) needed no change: the children share exactly the extra the container grew by, so the padding stays.

Test plan

  • New layout test: stretched children of a named stack stay one padding inside its border (fails without the fix)
  • `bundle exec rake`

🤖 Generated with Claude Code

…ner inside its padding

The cross-axis branch of Expander#expand passed the container's full outer
size to its children, so they sat flush on its border. Pass the inner size
(minus padding/title) and centre on the inner area, like the single-child case.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant