mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-03 15:46:43 +02:00
docs(block): add clarifying comment for overflow
This line is a bit confusing to me, so I thought I should clarify it!
See: 939da082b2
This commit is contained in:
@@ -272,6 +272,7 @@ function layoutBlocks(block: Block, db: BlockDB) {
|
|||||||
}
|
}
|
||||||
let columnsFilled = child?.widthInColumns ?? 1;
|
let columnsFilled = child?.widthInColumns ?? 1;
|
||||||
if (columns > 0) {
|
if (columns > 0) {
|
||||||
|
// Make sure overflowing lines do not affect later lines
|
||||||
columnsFilled = Math.min(columnsFilled, columns - (columnPos % columns));
|
columnsFilled = Math.min(columnsFilled, columns - (columnPos % columns));
|
||||||
}
|
}
|
||||||
columnPos += columnsFilled;
|
columnPos += columnsFilled;
|
||||||
|
Reference in New Issue
Block a user