getLayoutBounds method

Rect getLayoutBounds(
  1. Part part, [
  2. Rect? rect
])

This method is called by layouts to determine the size and initial position of the nodes that it is laying out. Normally this just returns the part's GraphObject#actualBounds. However, if #boundsComputation has been set to a function, that function will be called in order to return the bounds of the given Part in document coordinates that the layout should pretend it has. @param {Part} part the Part being laid out @param {Rect=} rect an optional Rect that will be modified and returned @return {Rect} a Rect in document coordinates @since 2.0

Implementation

_i3.Rect getLayoutBounds(
  _i3.Part part, [
  _i3.Rect? rect,
]) =>
    _i4.callMethod(
      this,
      'getLayoutBounds',
      [
        part,
        rect ?? _i5.undefined,
      ],
    );