isValidTo method

bool isValidTo([
  1. Node? tonode,
  2. GraphObject? toport
])

This predicate is true if it is permissible to connect a link to a given node/port. This is called by #isValidLink.

For a more general discussion of validation, see Introduction to Validation.

This method may be overridden, but we recommend that you call this base method. Please read the Introduction page on Extensions for how to override methods and how to call this base method. @expose @param {Node} tonode @param {GraphObject} toport @return {boolean} False if the node is in a Layer that does not Layer#allowLink. False if the port's GraphObject#toLinkable is either false or null. False if the number of links connected from the port would exceed the port's GraphObject#toMaxLinks. Otherwise true.

Implementation

_i2.bool isValidTo([
  _i3.Node? tonode,
  _i3.GraphObject? toport,
]) =>
    _i4.callMethod(
      this,
      'isValidTo',
      [
        tonode ?? _i5.undefined,
        toport ?? _i5.undefined,
      ],
    );