PanZoomState
Caller-owned mutable transform shared by one viewport and independent navigation controls.
Center coordinates use the content coordinate space, and zoom is a multiplier over the viewport's PanZoomFit scale. One live retained observer may own viewport geometry, while additional observers may read transform changes without publishing geometry. Reads, writes, observation, geometry publication, and observer release are confined to the construction execution owner. Observer callbacks may read state and release observers, but synchronous state writes are rejected so every observer sees a publication that still matches PanZoomState.metrics. If an observer fails, the committed metrics remain current, every other still-live observer is attempted, and the first failure escapes with later failures suppressed. The state owns no retained nodes or rendering resources.
Parameters
requested initial content center, or null to center the first published content bounds.
initial zoom multiplier within PanZoomState.minimumZoom and PanZoomState.maximumZoom.
Throws
when zoom limits or initial values are invalid.
Constructors
Properties
Functions
Centers the viewport on a content coordinate.
Converts a content coordinate to the current viewport-local coordinate space.
Converts a viewport-local coordinate to the current content coordinate space.
Registers one privileged owner-confined observer without immediately invoking it.
Moves the viewport center by a displacement in content units.
Restores minimum zoom and centers the current content bounds.
Publishes positive content and viewport geometry from one privileged retained viewport.
Multiplies zoom and optionally preserves one viewport-local anchor.
Sets zoom and optionally preserves one viewport-local anchor.