Skip to content

Commit

Permalink
#3358 Layoutfix for growing parent when children spans new rows due t…
Browse files Browse the repository at this point in the history
…o updated columns widths
  • Loading branch information
knsv committed Feb 2, 2024
1 parent 2fa9219 commit 51e7444
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/mermaid/src/diagrams/block/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ function setBlockSizes(block: Block, db: BlockDB, siblingWidth = 0, siblingHeigh
}

const columns = block.columns || -1;
const numItems = block.children.length;
let numItems = 0;
for (const child of block.children) {
numItems += child.widthInColumns || 1;
}

// The width and height in number blocks
let xSize = block.children.length;
Expand Down

0 comments on commit 51e7444

Please sign in to comment.