figma.viewport
These are methods and properties available on the figma.viewport
global object. It represents the area of the canvas that is currently visible on-screen, commonly referred to as the viewport. The position of the viewport is represented via its center coordinate and zoom level.
Vector
center:Center of the the current page that is currently visible on screen.
zoom: number
Zoom level. A value of 1.0 means 100% zoom, 0.5 means 50% zoom. [Read more]
BaseNode>): void
scrollAndZoomIntoView(nodes: ReadonlyArray<Automatically sets the viewport coordinates such that the nodes are visible on screen. It is the equivalent of pressing Shift-1.