cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1580
Views
1
Helpful
7
Replies

Problems with "collapsed" NodeSet property

mspoerr
Level 4
Level 4

Hello,

I have the following problems with the "collapsed" NodeSet property:

  • When I set it directly in the nodeSetConfig properties (collapsed: false), the nodeSets are still collapsed, but the Expand button ( + ) does not work any more
  • I 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?


Thanks,

/Mathias


Expand All function:

topo.getLayer('nodeSet').eachNodeSet(function (nodeSet) {

            nodeSet.collapsed(false);

        });

Example Topology before and after using the Expand All function:

good.PNG

AFTER:

bad.PNG

When I use the normal way to expand a NodeSet by pressing the Expand button ( + ), everything is fine:

good1.PNG

1 Accepted Solution

Accepted Solutions

aaikepae
Cisco Employee
Cisco Employee

Hi Mathias,

If your can describe you case with more detail, i can help you with that.  And topology has 'expandAll' API, you can directly use that.  'expanded' is an 'readOnly' property. so you can set value to that. If you can provide

Abu

View solution in original post

7 Replies 7

mizhu2
Cisco Employee
Cisco Employee

Hi,

When you use expand all, did some of the node expanded, If yes, that is because the max opened node shoud be 100.

Thanks

Ming Zhu

Hi Ming Zhu,

no, not one of the nodeSets expands and there are less than 30 nodes in the example drawing.

Thanks,

/Mathias

No ideas?

Thanks,

/Mathias

aaikepae
Cisco Employee
Cisco Employee

Hi Mathias,

If your can describe you case with more detail, i can help you with that.  And topology has 'expandAll' API, you can directly use that.  'expanded' is an 'readOnly' property. so you can set value to that. If you can provide

Abu

Hi Abu,

thank you very much for the hint - I couldn't find the method in the docs.

Is there a collapseAll function as well?

Thanks,

Mathias

Hi Mathias,

I added collapseAll to the latest version of NeXt, You can refer this implementation.

https://github.com/opendaylight/next/blob/master/src/js/topology/topology/node/NodeMixin.js#L894-L933

Abu

Hi Abu,

thank you very much!

Regards,

Mathias

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: