linkValidation property
bool Function(Node, GraphObject, Node, GraphObject, Link)?
get
linkValidation
Gets or sets a predicate that determines whether or not a new link between two ports would be valid. This predicate is called in addition to the normal link checking performed by #isValidLink and any Node#linkValidation predicates on the "from" and "to" nodes. When relinking, the Link being considered for reconnection is passed as the fifth argument. The default predicate is null, which is equivalent to simply returning true.
For a more general discussion of validation, see Introduction to Validation.
The function, if supplied, must not have any side-effects.
Implementation
_i2.bool Function(
_i3.Node,
_i3.GraphObject,
_i3.Node,
_i3.GraphObject,
_i3.Link,
)? get linkValidation => (
_i3.Node p0,
_i3.GraphObject p1,
_i3.Node p2,
_i3.GraphObject p3,
_i3.Link p4,
) =>
_i4.callMethod(
_i4.getProperty(
this,
'linkValidation',
),
r'call',
[
this,
p0,
p1,
p2,
p3,
p4,
],
);
set
linkValidation
(bool value(Node, GraphObject, Node, GraphObject, Link)?)
Implementation
set linkValidation(
_i2.bool Function(
_i3.Node,
_i3.GraphObject,
_i3.Node,
_i3.GraphObject,
_i3.Link,
)? value) {
_i4.setProperty(
this,
'linkValidation',
value == null ? _i5.undefined : _i4.allowInterop(value),
);
}