hi…
Assuming i have two nodes Alpha & Beta…
Only one link connection to be happen
Either from Alpha to Beta or beta to alpha…how i can do it??
I can’t tell what it is that you want. Have you read GoJS Validation -- Northwoods Software ?
yes…i have
assuming for Alpha i set from : true
and for beta to : true then i can make connection from alpha to beta(But not Beta to Alpha)
I want only single link which allows me to drawLink either from Alpha to Beta or Beta to Alpha
1 Like
If you’ve read that page about Link Validation carefully, you’ll know that you need to define a linkValidation predicate.
$(go.Node, . . .,
{
linkValidation: function(fromnode, fromport, tonode, toport) {
// total number of links connecting with a node is limited to 1:
return fromnode.linksConnected.count + tonode.linksConnected.count < 1;
}
}, . . .