If you go to the basic example page and open the devtool and type out this snippet:
window.go.Diagram.fromDiv('myDiagramDiv').nodes
.filter(n => n.findNodesInto().count === 0)
.each(n => console.log(n));
You WON’T see any console logs. But if you change it to this:
window.go.Diagram.fromDiv('myDiagramDiv').nodes
.filter(n => n.findNodesInto().count === 0)
.each(n => console.log('::', n));
// ^ Note here
Then you’ll get the followings:
:: Node {n: 12582915, qu: null, Wu: 0, Bo: 0, f: GraphObjectTemplateSettings, …}
:: Group {n: 12582915, qu: null, Wu: 0, Bo: 0, f: GraphObjectTemplateSettings, …}
Why is that?
walter
2
I just did a verbatim copy and paste of your first code into the console for that Basic sample:
It printed out:
Object { n: 12582915, qu: null, Wu: 0, Bo: 0, f: {…}, nh: null, q: null, ct: {…}, ee: {…}, Wt: 1, … }
debugger eval code:3:22
Object { n: 12582915, qu: null, Wu: 0, Bo: 0, f: {…}, nh: null, q: null, ct: {…}, ee: {…}, Wt: 1, … }
debugger eval code:3:22
But I normally use Firefox, so I tried Chrome, with a result as I think you would expect:
Node {n: 12582915, qu: null, Wu: 0, Bo: 0, f: GraphObjectTemplateSettings, …} VM14:3
Group {n: 12582915, qu: null, Wu: 0, Bo: 0, f: GraphObjectTemplateSettings, …}
So I cannot explain the behavior that you see.
Thanks, it’s really strange.