Skip to main content

getScrollState()

returns the position of the diagram inner scroll

getScrollState(): ICoords;

Returns:

An object which stores positions of scrolls.

Example

const state = diagram.getScrollState();
// diagram.scrollTo( state.x, state.y );

Related sample: Diagram. Scroll content

A resulting object has two properties:

  • x - horizontal scroll position
  • y - vertical scroll position

Scrolling Diagram