diff --git a/geneit_app/src/widgets/complex_family_tree/ComplexFamilyTree.tsx b/geneit_app/src/widgets/complex_family_tree/ComplexFamilyTree.tsx index fe63749..3fa07aa 100644 --- a/geneit_app/src/widgets/complex_family_tree/ComplexFamilyTree.tsx +++ b/geneit_app/src/widgets/complex_family_tree/ComplexFamilyTree.tsx @@ -33,10 +33,10 @@ export function ComplexFamilyTree(p: { store, svg: view.svg, card_dim: { - w: 230, - h: 70, - text_x: 75, - text_y: 15, + w: 160, + h: 118, + text_x: 5, + text_y: 70, img_w: 60, img_h: 60, img_x: 5, @@ -123,14 +123,20 @@ export function ComplexFamilyTree(p: { dstSVG = dstSVG.replaceAll("✝", " "); let womanTiles = getAllIndexes(dstSVG, "card-female"); - for (const i of womanTiles) { + let count = 0; + for (let i of womanTiles) { + // Correct padding due to previous corrections + i += count++ * 2; dstSVG = dstSVG.substring(0, i) + dstSVG.substring(i + 1).replace(`fill="white"`, `fill="#ffb6c1"`); } + count = 0; let manTiles = getAllIndexes(dstSVG, "card-male"); - for (const i of manTiles) { + for (let i of manTiles) { + // Correct padding due to previous corrections + i += count++ * 2; dstSVG = dstSVG.substring(0, i) + dstSVG.substring(i + 1).replace(`fill="white"`, `fill="#add8e6"`);