Hi,
with GoJS 3 it seems that the node functions findLinksOutOf and findLinksInto return the complete linksConnected collection instead of the filtered collection.
I have a node with 2 links into and 3 links out of.
Both findLinksOutOf and findLinksInto return the same iterator with a count of 5.
I inserted this code into our template and it works, the functions return the correctly filtered collection but it does not when we find and access the node programmatically .
This is the code in question.
p is a go.Part
const node = diagram.findNodeForData(p!.data)!;
console.log(node);
console.log('all links: ', node.findLinksConnected().map(link => link.data!));
console.log('in links: ', node.findLinksInto().map(link => link.data!));
console.log('out links: ', node.findLinksOutOf().map(link => link.data!));
Ok. I found the source of the problem.
The code in my last post works just fine. (One of these days where things sometimes work and sometimes not, or at least they appear to be)
This reproduces the wrong and the correct collection output .
It appears to be the spread into a new array operation causes the issue.