Skip to content
Advertisement

Tag: cytoscape.js

collapsing/expanding compound node in cytoscape

Does cytoscape.js support collapsing/expanding compound node ? After collapsing A (+) or (-) sign to expand/collapse would be great. Looking for options to Group a set of nodes using Compound node and collapse/expand via user-interaction. If cytoscape.js doesn’t support this by-default, any alternatives/workarounds to reach the goal ? Answer It’s relatively straightforward using the API. Collapse: node1.descendants().addClass(‘collapsed-child’) Expand: node1.descendants().removeClass(‘collapsed-child’) …

Advertisement