@HachimDev wrote:
Hi,
Sorry if this is an obvious question but im still learning GoJS (which is great btw)
so my question is how can i collapse all nodes when doubleclicking on one of them ?
I want to be have only one expanded node at all timehere is my code :
go.Node, { selectionAdorned: false, isTreeExpanded: false, doubleClick: (e, node) => { let cmd = myTreeLocal.commandHandler; if (!node.isTreeLeaf) { if (!node.isTreeExpanded) { if (!cmd.canExpandTree(node)) return; cmd.expandTree(node); NetworkActions.requestNetworkbyId(node.Zd.dataKey); } } else { } } },Thank you !
Posts: 3
Participants: 2