FEAT-4: sync inbreeding DTO to FEAT-1b InbreedingResult + anchor root card left so parents are visible on phone at load

Verified end-to-end against a DATA-2-contract mock (5-gen family, shared ancestor): phone/desktop, re-root, lazy expand, zoom/fit, print Ahnentafel, 404 state.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-06 00:30:14 +02:00
parent d3550bbc16
commit 74ac6ddb5a
2 changed files with 14 additions and 8 deletions

View File

@@ -174,13 +174,14 @@ export default function StammbaumPage() {
return () => observer.disconnect()
}, [hasRoot])
/* ── Ansicht (Zoom/Position): Wurzelkarte beim Laden zentriert ── */
/* ── Ansicht (Zoom/Position): Wurzelkarte links, vertikal zentriert
so sind die Eltern auch auf dem Smartphone sofort sichtbar. ── */
const defaultView = useMemo<View | null>(() => {
if (!size) return null
const zoom = size.w < 520 ? 0.8 : 1
return {
zoom,
translate: { x: Math.min(size.w / 2, CARD_W * zoom + 48), y: size.h / 2 },
translate: { x: (CARD_W / 2) * zoom + 24, y: size.h / 2 },
}
}, [size])