Fix gen-0 row wrapping when PoI has no spouses

Siblings sharing gen 0 with a spouse-less PoI now respect the
2-wide row limit instead of all rendering on a single line.
This commit is contained in:
2026-03-16 14:17:14 +01:00
parent 0369f781fa
commit 243baf186d
2 changed files with 4 additions and 3 deletions

View File

@@ -112,8 +112,9 @@ export function computeLayout(persons, mainId, config) {
continue;
}
// Gen-0 (root + spouses): never wrap — all on one row
const rowLimit = (g === 0) ? ordered.length : 2;
// Gen-0 with spouses: never wrap — all on one row
// Gen-0 without spouses (siblings included): respect 2-wide limit
const rowLimit = (g === 0 && rootSpouses.size > 0) ? ordered.length : 2;
const rows = wrapIntoRows(ordered, rowLimit);
for (let r = 0; r < rows.length; r++) {