Make the pedigree tree zoomable

Add zoom to the pedigree: −/reset/+ buttons in the header, ctrl/⌘ + wheel,
and two-finger pinch. Scaling uses the CSS `zoom` property (not transform)
so the container reflows and every part stays reachable by scrolling at any
level. Clamped to 40–160% and the level is remembered per device.
This commit is contained in:
Alexander Heldt
2026-07-26 10:49:54 +00:00
parent 01d64b682b
commit 12a5bd0548
4 changed files with 69 additions and 0 deletions
+17
View File
@@ -1066,8 +1066,25 @@ section.collapsed > :not(h2) { display: none; }
padding: 12px 4px 8px;
}
.pedigree-header h1 { font-size: 1.4rem; }
.ped-zoom {
margin-left: auto;
display: flex;
align-items: center;
gap: 4px;
flex-shrink: 0;
}
.ped-zoom .icon-btn { padding: 4px 9px; font-size: 1.1rem; }
#ped-zoom-reset {
padding: 5px 8px;
font-size: 0.8rem;
font-variant-numeric: tabular-nums;
min-width: 48px;
}
.pedigree-hint { margin: 4px 0 12px; }
/* The tree scales with the CSS `zoom` property, which reflows so the container
still scrolls to reach the edges at any zoom. */
.pedigree-tree { touch-action: pan-x pan-y; }
.pedigree-status {
margin: 10px 0;