Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic using v5 beta canvas mode: collapsed nodes not deleted (Read 2513 times)
hans
Junior Member
**
Offline


I Love MindFusion!

Posts: 81
Location: Netherlands
Joined: Mar 17th, 2012
using v5 beta canvas mode: collapsed nodes not deleted
Feb 26th, 2013 at 4:16pm
Print Post  
I have a node with childnodes that are collapsed. When I delete the node, the childnodes are not deleted.
They remain invisible and unreachable.
I think they should be deleted with the parent, as the are in the applet mode?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: using v5 beta canvas mode: collapsed nodes not deleted
Reply #1 - Feb 26th, 2013 at 6:13pm
Print Post  
This won't be available in the current release. For the time being you can delete the child nodes from the parent's nodeDeleted event. E.g. if you are talking about containers:

Code
Select All
function onNodeDeleted(sender, args)
{
	var node = args.getNode();
	if (node.children)
	{
		Array.forEach(node.children, function (child)
		{
			diagram.removeItem(child);
		});
	}
} 



or otherwise loop over getAttachedNodes() if using groups.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint