when drag the link from node to node is working fine, but when drag the link to canvase not validating.
private linkValidation(tool) {
tool.linkValidation = function(fromnode, fromport, tonode, toport) {
// total number of links connecting with a port is limited to 1:
if(fromnode.findLinksBetween(tonode).count < 1) {
return true
} else {
return false
}
}
}
public ngAfterViewInit() {
this.linkValidation(this.dia.toolManager.linkingTool);
this.linkValidation(this.dia.toolManager.relinkingTool);
}```