fix: vertically center name/role text between avatar and card bottom

Moved name baseline from y+58 to y+66 and role from y+74 to y+82,
centering the text block in the 55px gap between the avatar circle
bottom (y+41) and the card bottom (y+96).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
dotta
2026-03-20 07:04:59 -05:00
parent bf5cfaaeab
commit 401b241570

View File

@@ -235,8 +235,8 @@ const THEMES: Record<OrgChartStyle, StyleTheme> = {
const bgColor = isCeo ? "rgba(168,85,247,0.06)" : theme.cardBg; const bgColor = isCeo ? "rgba(168,85,247,0.06)" : theme.cardBg;
const avatarCY = ln.y + 24; const avatarCY = ln.y + 24;
const nameY = ln.y + 58; const nameY = ln.y + 66;
const roleY = ln.y + 74; const roleY = ln.y + 82;
return `<g> return `<g>
<rect x="${ln.x}" y="${ln.y}" width="${ln.width}" height="${ln.height}" rx="${theme.cardRadius}" fill="${bgColor}" stroke="${borderColor}" stroke-width="1"/> <rect x="${ln.x}" y="${ln.y}" width="${ln.width}" height="${ln.height}" rx="${theme.cardRadius}" fill="${bgColor}" stroke="${borderColor}" stroke-width="1"/>
@@ -299,8 +299,8 @@ const THEMES: Record<OrgChartStyle, StyleTheme> = {
const roleText = schemaRoles[tag] || schemaRoles.default; const roleText = schemaRoles[tag] || schemaRoles.default;
const avatarCY = ln.y + 24; const avatarCY = ln.y + 24;
const nameY = ln.y + 58; const nameY = ln.y + 66;
const roleY = ln.y + 74; const roleY = ln.y + 82;
return `<g> return `<g>
<rect x="${ln.x}" y="${ln.y}" width="${ln.width}" height="${ln.height}" rx="${theme.cardRadius}" fill="${theme.cardBg}" stroke="${theme.cardBorder}" stroke-width="1"/> <rect x="${ln.x}" y="${ln.y}" width="${ln.width}" height="${ln.height}" rx="${theme.cardRadius}" fill="${theme.cardBg}" stroke="${theme.cardBorder}" stroke-width="1"/>