Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic attached nodes do not collapse with parent. (Read 3349 times)
hans
Junior Member
**
Offline


I Love MindFusion!

Posts: 81
Location: Netherlands
Joined: Mar 17th, 2012
attached nodes do not collapse with parent.
Feb 16th, 2013 at 10:00pm
Print Post  
I have 2 nodes linked with expandable=true. I attach a node to the child node with newnode.attachTo(secondNode) .
Now, when I collapse the masternode, the childnode does collapse, but the node attached to this childnode doesn't.
I think it should.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: attached nodes do not collapse with parent.
Reply #1 - Feb 18th, 2013 at 5:43pm
Print Post  
You could update the child nodes' visibility from treeCollapsed and treeExpanded event handlers:

Code
Select All
function onTreeCollapsed(sender, args)
{
	Array.forEach(sender.nodes, function (node)
	{
		if (node.masterNode)
			node.setVisible(node.masterNode.getVisible());
	});
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
hans
Junior Member
**
Offline


I Love MindFusion!

Posts: 81
Location: Netherlands
Joined: Mar 17th, 2012
Re: attached nodes do not collapse with parent.
Reply #2 - Feb 20th, 2013 at 2:48pm
Print Post  
I can't get onTreeCollapsed fired with TreeCollapsedScript="onTreeCollapsed"
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: attached nodes do not collapse with parent.
Reply #3 - Feb 20th, 2013 at 2:56pm
Print Post  
We have added server support for canvas mode expand/collapse events recently, try the latest build from http://mindfusion.eu/Forum/YaBB.pl?num=1360850453/3#3, or use the addEventHandler method to attach them from script.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint