linkDataArray

Hi Team,

How to check whether a link has been drawn between two nodes or not ?

I should alert the user if he/she has not drawn a link between two nodes.

Please suggest.

If you have the two Nodes, just call Node.findLinksTo or Node.findLinksBetween.

To find a Node, consider calling Diagram.findNodeForKey or Diagram.findNodeForData.

Hi Walter,

I want to check whether all the nodes in my diagram is linked to each other or not.

There can be any no of nodes in the diagram.

How to achieve this.

Please suggest.

for (var it = myDiagram.nodes; it.next();) {
var node = it.value;
if (node.linksConnected.count === 0) alert("unconnected node: " + node.data.key);
}

Thanks Walter.

This code works.