Viewport
Camera transform for the infinite canvas. Elements are stored in world coordinates; the viewport projects them onto the screen using a translate
uniform-scale transform.
Screen-pixel point s and world point w relate as: s = w * scale + offset w = (s - offset) / scale
Camera state is session state — not serialized, not in undo history. Mutate by returning a new Viewport via panBy, zoomBy, or zoomTo.
Constructors
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Set scale to targetScale anchored at focalScreen.