Got the following problems with the "collapsed" NodeSet property:
- When trying to set it directly in the nodeSetConfig properties (collapsed: false), the nodeSets are still collapsed, but the Expand button ( + ) does not work any more
- Have tried to implement an Expand All function. It does expand all NodeSets, but zooms out at the same time and no Collapse buttons ( - ) are visible:
Is there any other/better way to alter the "collapsed" property.
Expand All function:
topo.getLayer('nodeSet').eachNodeSet(function (nodeSet) {
nodeSet.collapsed(false);
});
Example Topology before and after using the Expand All function:
AFTER:
The normal way to expand a NodeSet by pressing the Expand button ( + ), everything is fine:
When you use expand all, did some of the node expanded, If yes, that is because the max opened node shoud be 100.
- No, not one of the nodeSets expands and there are less than 30 nodes in the example drawing.
Topology has 'expandAll' API, you can directly use that. 'expanded' is an 'readOnly' property. so you can set value to that.
- Is there a collapseAll function as well
Added collapseAll to the latest version of NeXt, You can refer this implementation.
Comments
0 comments
Please sign in to leave a comment.