- Welcome, Guest. Please Login or Register
MindFusion  
  We have released initial version of MindFusion.JavaScript pack. It includes chart, diagram, calendar, map, virtual keyboard, gauge and UI components. Here are more details and live demo for anyone interested.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
Expand icon(+) shown and partial expanded state shown for node having collapsed state
Read 819 times

swapnil   Offline
YaBB Newbies
*
Posts: 8
I Love MindFusion!


   
     
 
Expand icon(+) shown and partial expanded state shown for node having collapsed state
Sep 27th, 2018 at 12:02pm
 
Hello,

I am using Border tree layout of mind fusion. I am saving the collapsed/expanded state of the nodes and drawing diagram after loading the states. It is working in some cases but when the parent node has more than one children and both the children's have expanded =false and saved then parent node has + icon besides it and one of the child is still shown (refer attachment).Diagram representation is attached.
Any idea why + icon is displayed at node 3 instead of - also why 4th node is still visible when its parent has expanded
=false .
 
 

tree_diagram.png (7 KB | 62 )
tree_diagram.png
 
IP Logged    
 
     

Slavcho   Offline
YaBB Moderator
*****
Posts: 1828
Gender: male
tech.support


   
     
 
Re: Expand icon(+) shown and partial expanded state shown for node having collapsed state
Reply #1 - Sep 27th, 2018 at 2:01pm
 
Hi,

Collapsing only hides current child nodes. If you set Expanded = false before creating actual children and connecting them with parent, the newly added children will be visible. Try restoring your states after the tree has been fully built.

Regards,
Slavcho
 
 
 
IP Logged    
 
     

swapnil   Offline
YaBB Newbies
*
Posts: 8
I Love MindFusion!


   
     
 
Re: Expand icon(+) shown and partial expanded state shown for node having collapsed state
Reply #2 - Sep 28th, 2018 at 8:27am
 
Hello,

Tried to set the collapsed state after the diagram is fully created with nodes and links but still the same issue.
Setting the expanded =false in the node from diagrams nodes array.

It should work as instead of clicking the '+,-' icon,  I am setting the expanded value on the node itself but getting the same error mentioned previously.
 
 
 
IP Logged    
 
     

Slavcho   Offline
YaBB Moderator
*****
Posts: 1828
Gender: male
tech.support


   
     
 
Re: Expand icon(+) shown and partial expanded state shown for node having collapsed state
Reply #3 - Sep 28th, 2018 at 9:47am
 
Hi,

Are you calling the setter method like node.setExpanded(...) or just assigning to the .expanded field?

Regards,
Slavcho
 
 
 
IP Logged    
 
     

swapnil   Offline
YaBB Newbies
*
Posts: 8
I Love MindFusion!


   
     
 
Re: Expand icon(+) shown and partial expanded state shown for node having collapsed state
Reply #4 - Sep 28th, 2018 at 10:04am
 
I am using node.setExpanded(...)
 
 
 
IP Logged    
 
     

swapnil   Offline
YaBB Newbies
*
Posts: 8
I Love MindFusion!


   
     
 
Re: Expand icon(+) shown and partial expanded state shown for node having collapsed state
Reply #5 - Sep 28th, 2018 at 1:56pm
 
Hello,

Below is the sample code with the problem. Please look into it.
Extract the file and run npm install on the folder. Ignore the jasmine errors. Run npm start and open localhost:4200 to run the application in browser.

Regards,
Swapnil Thosar
 
 
 
IP Logged    
 
     

Slavcho   Offline
YaBB Moderator
*****
Posts: 1828
Gender: male
tech.support


   
     
 
Re: Expand icon(+) shown and partial expanded state shown for node having collapsed state
Reply #6 - Oct 1st, 2018 at 11:30am
 
Hi,

Try setting the property in child-to-parent direction starting closest to leaf nodes, e.g. this should work with your test -

Code:
   diagram.getNodes()[3].setExpanded(false);
   diagram.getNodes()[2].setExpanded(false);
   diagram.getNodes()[0].setExpanded(false);
 



That's how users would hide these branches interactively (otherwise they would not see children to collapse) and the control saves some state along the way that gets invalid if starting from the root.

Regards,
Slavcho
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print