How to get scroll-node-into-view

Depend on fontoxml-scroll-into-view to make this operation available.

Scrolls the content view to ensure the specified node is visible.

If the node is already fully visible in the viewport, the alignTo option will be ignored and no scrolling will take place. Also note that modifying the selection always scrolls the cursor into view.

Imported operation data

Name Type Description
contextNodeId NodeId

The node ID of the node to scroll into view.

[hierarchyNodeId] HierarchyNodeId

The hierarchy node ID under which the node to be scrolled into view is rendered. This can be used to disambiguate cases where the hierarchy contains multiple references to the same document. If omitted, Fonto will use the sheet frame that most recently contained the cursor.

[alignTo] String

determines how the contextNode is positioned relative to the viewport. Possible values are:

  • top: (Default) The top of the node is scrolled to the top of the viewport.

  • center: The vertical center of the node is scrolled to the middle of the viewport.

  • bottom: The bottom of the node is scrolled to the bottom of the viewport.

[viewName] ViewName

The view name to scroll into view.

Was this page helpful?