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:
parent
bf5cfaaeab
commit
401b241570
1 changed files with 4 additions and 4 deletions
|
|
@ -235,8 +235,8 @@ const THEMES: Record<OrgChartStyle, StyleTheme> = {
|
|||
const bgColor = isCeo ? "rgba(168,85,247,0.06)" : theme.cardBg;
|
||||
|
||||
const avatarCY = ln.y + 24;
|
||||
const nameY = ln.y + 58;
|
||||
const roleY = ln.y + 74;
|
||||
const nameY = ln.y + 66;
|
||||
const roleY = ln.y + 82;
|
||||
|
||||
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"/>
|
||||
|
|
@ -299,8 +299,8 @@ const THEMES: Record<OrgChartStyle, StyleTheme> = {
|
|||
const roleText = schemaRoles[tag] || schemaRoles.default;
|
||||
|
||||
const avatarCY = ln.y + 24;
|
||||
const nameY = ln.y + 58;
|
||||
const roleY = ln.y + 74;
|
||||
const nameY = ln.y + 66;
|
||||
const roleY = ln.y + 82;
|
||||
|
||||
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"/>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue