centerRect method

void centerRect(
  1. Rect r
)

Modifies the #position to show a given Rect of the Diagram by centering the viewport on that Rect.

If the rect is near the #documentBounds and if the #scrollMargin is small, it might not be possible to scroll far enough to actually put the Rect area in the center of the viewport. @param {Rect} r @see #scrollToRect @see #scroll

Implementation

void centerRect(_i3.Rect r) {
  _i4.callMethod(
    this,
    'centerRect',
    [r],
  );
}