feat(stammbaum): drive viewBox from PanZoomState (pan + zoom) (#692)
Replace the scalar zoom prop with a {x,y,z} PanZoomState. The viewBox centre
is offset by the pan and width/height scaled by zoom; the default {0,0,1}
frames the whole tree (fit-to-screen). Page header buttons now step view.z
through clampZoom over the resolved 0.25–3.0 range.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,9 @@ export const DEFAULT_ZOOM = 1;
|
||||
/** Minimum zoom a recentre will snap up to so the focal node's text is legible (OQ-005). */
|
||||
export const LEGIBLE_ZOOM = 1;
|
||||
|
||||
/** Fixed zoom increment per keyboard `+`/`-` press and per control-button click (OQ-002). */
|
||||
export const ZOOM_STEP_KB = 0.1;
|
||||
|
||||
/**
|
||||
* The canvas view state. `x`/`y` are pan offsets applied to the viewBox centre
|
||||
* (SVG user units); `z` is the zoom factor. The default `{0, 0, 1}` frames the
|
||||
|
||||
Reference in New Issue
Block a user