scrollToPart method

void scrollToPart([
  1. Part? part
])

This command scrolls the diagram to make a highlighted or selected Part visible in the viewport. Call this command repeatedly to cycle through the Diagram#highlighteds collection, if there are any Parts in that collection, or else in the Diagram#selection collection, scrolling to each one in turn by calling Diagram#centerRect.

This method animates to the scrolled part, and Diagram#scrollToRect does not.

This is normally invoked by the Space keyboard shortcut. If there is no argument and there is no highlighted or selected Part, this command does nothing.

This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Introduction page on Extensions for how to override methods and how to call this base method.

@expose @param {Part=} part This defaults to the first highlighted Part of Diagram#highlighteds, or, if there are no highlighted Parts, the first selected Part. @see #canScrollToPart @see Diagram#scrollToRect @since 1.6

Implementation

void scrollToPart([_i3.Part? part]) {
  _i4.callMethod(
    this,
    'scrollToPart',
    [part ?? _i5.undefined],
  );
}