Fix issue with large trees
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1c1f2cc710
commit
e1bc10e299
@ -33,10 +33,10 @@ export function ComplexFamilyTree(p: {
|
|||||||
store,
|
store,
|
||||||
svg: view.svg,
|
svg: view.svg,
|
||||||
card_dim: {
|
card_dim: {
|
||||||
w: 230,
|
w: 160,
|
||||||
h: 70,
|
h: 118,
|
||||||
text_x: 75,
|
text_x: 5,
|
||||||
text_y: 15,
|
text_y: 70,
|
||||||
img_w: 60,
|
img_w: 60,
|
||||||
img_h: 60,
|
img_h: 60,
|
||||||
img_x: 5,
|
img_x: 5,
|
||||||
@ -123,14 +123,20 @@ export function ComplexFamilyTree(p: {
|
|||||||
dstSVG = dstSVG.replaceAll("✝", " ");
|
dstSVG = dstSVG.replaceAll("✝", " ");
|
||||||
|
|
||||||
let womanTiles = getAllIndexes(dstSVG, "card-female");
|
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 =
|
||||||
dstSVG.substring(0, i) +
|
dstSVG.substring(0, i) +
|
||||||
dstSVG.substring(i + 1).replace(`fill="white"`, `fill="#ffb6c1"`);
|
dstSVG.substring(i + 1).replace(`fill="white"`, `fill="#ffb6c1"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
count = 0;
|
||||||
let manTiles = getAllIndexes(dstSVG, "card-male");
|
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 =
|
||||||
dstSVG.substring(0, i) +
|
dstSVG.substring(0, i) +
|
||||||
dstSVG.substring(i + 1).replace(`fill="white"`, `fill="#add8e6"`);
|
dstSVG.substring(i + 1).replace(`fill="white"`, `fill="#add8e6"`);
|
||||||
|
Loading…
Reference in New Issue
Block a user