diff --git a/frontend/src/lib/person/genealogy/panZoom.test.ts b/frontend/src/lib/person/genealogy/panZoom.test.ts index ad9e8371..e881f6a4 100644 --- a/frontend/src/lib/person/genealogy/panZoom.test.ts +++ b/frontend/src/lib/person/genealogy/panZoom.test.ts @@ -31,13 +31,13 @@ describe('clampZoom', () => { }); it('clamps above MAX_ZOOM down to MAX_ZOOM', () => { - expect(clampZoom(5)).toBe(MAX_ZOOM); - expect(clampZoom(3.0001)).toBe(MAX_ZOOM); + expect(clampZoom(99)).toBe(MAX_ZOOM); + expect(clampZoom(MAX_ZOOM + 0.0001)).toBe(MAX_ZOOM); }); it('exposes the resolved zoom bounds', () => { expect(MIN_ZOOM).toBe(0.25); - expect(MAX_ZOOM).toBe(3.0); + expect(MAX_ZOOM).toBe(10); }); }); diff --git a/frontend/src/lib/person/genealogy/panZoom.ts b/frontend/src/lib/person/genealogy/panZoom.ts index 69c4af40..b306d095 100644 --- a/frontend/src/lib/person/genealogy/panZoom.ts +++ b/frontend/src/lib/person/genealogy/panZoom.ts @@ -9,9 +9,14 @@ * project. See ADR-027 for why this is custom rather than a third-party library. */ -/** Resolved zoom bounds (OQ-001). */ +/** + * Zoom bounds. OQ-001 originally resolved the ceiling to 3.0, but because zoom + * is normalised to the whole tree, z=3 still shows too much of a wide tree to be + * legible on a phone — so the ceiling was raised to 10 (product-owner revision, + * #692). SVG stays vector-crisp at any zoom, so a generous max is harmless. + */ export const MIN_ZOOM = 0.25; -export const MAX_ZOOM = 3.0; +export const MAX_ZOOM = 10; export const DEFAULT_ZOOM = 1; /** Minimum zoom a recentre will snap up to so the focal node's text is legible (OQ-005). */