boundsComputation property

Rect Function(Part, Layout, Rect)? get boundsComputation

Gets or sets a function that determines the initial size and position in document coordinates of a LayoutVertex corresponding to a Node. This function is called by #getLayoutBounds. The default value for this property is null, in which case the GraphObject#actualBounds of the Node is used. Setting this property to a new value invalidates this layout.

The non-null value must be a function that takes 3 arguments. The first argument will be the Part whose bounds the Layout should use. The second argument will be this Layout. The third argument will be a Rect that must be modified and returned The return value must be in document coordinates. You may find it convenient to call GraphObject#getDocumentBounds to get the bounds in document coordinates of an object within the node.

Implementation

_i3.Rect Function(
  _i3.Part,
  _i3.Layout,
  _i3.Rect,
)? get boundsComputation => (
      _i3.Part p0,
      _i3.Layout p1,
      _i3.Rect p2,
    ) =>
        _i4.callMethod(
          _i4.getProperty(
            this,
            'boundsComputation',
          ),
          r'call',
          [
            this,
            p0,
            p1,
            p2,
          ],
        );
set boundsComputation (Rect value(Part, Layout, Rect)?)

Implementation

set boundsComputation(
    _i3.Rect Function(
      _i3.Part,
      _i3.Layout,
      _i3.Rect,
    )? value) {
  _i4.setProperty(
    this,
    'boundsComputation',
    value == null ? _i5.undefined : _i4.allowInterop(value),
  );
}