Quantcast
Channel: Northwoods Software - Latest topics
Viewing all articles
Browse latest Browse all 7419

Update all Nodes

$
0
0

@chinenyem wrote:

After reading http://gojs.net/latest/intro/collections.html I tried to set multiple nodes at sequentially by looping over them. However I keep getting an error " Is that really your intent?". What am I doing wrong?

if (node instanceof go.Node && node.data.isGroup) {
for (var it = myDiagram.nodes; it.next(); ) {
var n = it.value; // n is now a Node or a Group
if (n.data.type === "link_item") {
myDiagram.model.setDataProperty(n, 'status', 'deleted');
}
}
console.log(myDiagram.model.toJson())
}

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7419

Trending Articles