linkValidation property
Gets or sets a predicate that determines whether or not a Link may be connected with this node. If this is non-null, the predicate is called in addition to the predicate that is LinkingBaseTool#linkValidation on the LinkingTool and RelinkingTool. See LinkingBaseTool#isValidLink for more details.
The default predicate is null, which is equivalent to simply returning true. The first argument will be the proposed "from" Node (may be null). The second argument will be the proposed "from" GraphObject port (may be null). The third argument will be the proposed "to" Node (may be null). The fourth argument will be the proposed "to" GraphObject port (may be null). The fifth argument may be null when asking about creating a new link, or may be a Link when asking about reconnecting an existing link.
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,
],
);
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),
);
}