anime
anime

Reputation: 165

Cytoscape Collapse all parent nodes by default

I am using cytoscape.js with react-cytoscape and cytoscape-undo-redo and cytoscape-expand-collapse. I am also using COSEBilkent layout for my graph(as I need to have option of compound nodes). At first I receive all nodes and expanded groups. I would like to have these compounded nodes to be collapsed at first, but I can not find a solution. Can anyone please help? What i Have right now

What I expect to be at first render

Upvotes: 1

Views: 530

Answers (1)

anime
anime

Reputation: 165

I found out finally api.collapseAll() does the trick

Upvotes: 2

Related Questions