fromPortChanged property

void Function(Link, [GraphObject?, GraphObject?])? get fromPortChanged

Gets or sets the function that is called after this Link changes which Node or port it connects from. The first argument will be this Link. The second argument will be the old GraphObject port. The third argument will be the new GraphObject port.

If the value is a function, that function must not modify which nodes or links this link connects with. The "from" node and/or port has already been changed -- trying to change it again may produce undefined behavior.

The default value is null -- no function is called.

Implementation

void Function(
  _i3.Link, [
  _i3.GraphObject?,
  _i3.GraphObject?,
])? get fromPortChanged => (
      _i3.Link p0, [
      _i3.GraphObject? p1,
      _i3.GraphObject? p2,
    ]) =>
        _i4.callMethod(
          _i4.getProperty(
            this,
            'fromPortChanged',
          ),
          r'call',
          [
            this,
            p0,
            p1 ?? _i5.undefined,
            p2 ?? _i5.undefined,
          ],
        );
set fromPortChanged (void value(Link, [GraphObject?, GraphObject?])?)

Implementation

set fromPortChanged(
    void Function(
      _i3.Link, [
      _i3.GraphObject?,
      _i3.GraphObject?,
    ])? value) {
  _i4.setProperty(
    this,
    'fromPortChanged',
    value == null ? _i5.undefined : _i4.allowInterop(value),
  );
}