Scope font-size rules to fng-container to avoid overriding full-diagram styles

This commit is contained in:
2026-03-16 21:04:11 +01:00
parent c9d1054d37
commit 9321011bfe
4 changed files with 61 additions and 12 deletions

View File

@@ -153,13 +153,13 @@ export function renderPersonCard(parent, person, config, onClick) {
const firstName = data["first name"] || "";
const lastName = data["last name"] || "";
const displayName = formatDisplayName(firstName, lastName, data.fullName);
const maxTextWidth = w - textXOffset - 5;
const maxTextWidth = w - textXOffset;
g.append("text")
.attr("class", "person-name")
.attr("x", textXOffset)
.attr("y", h / 2 - 4)
.text(truncateText(displayName, maxTextWidth, 5.5));
.text(truncateText(displayName, maxTextWidth, 4.5));
// Dates line (compact)
const dates = formatDates(data.birthYear, data.deathYear, data.isDead);