@express-document-sdk / Viewport
Class: Viewport
Represents the area of the canvas that is currently visible on-screen.
Methods
bringIntoView()
• bringIntoView(node
): void
Adjusts the viewport to make the node's bounds visible on-screen, assuming all bounds are within the artboard bounds. Makes the node's ArtboardNode or PageNode visible if they were not already visible (which may result in Context.selection being cleared). It is strongly recommended to further draw the user's attention to the node, set it as the Context.selection following this call.
After this call, the value of Context.insertionParent will always be the node containing ArtboardNode.
Note that the node might still not be visible if:
- Its animation settings make it invisible at the beginning of the ArtboardNode "scene".
- It is obscured underneath other artwork in the z-order.
- It is hidden by a GroupNode's mask or similar cropping.
Parameters
• node: VisualNode
Returns
void