Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram.Nodes.Remove also removes links (Read 1819 times)
jackalexander
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Sep 24th, 2011
Diagram.Nodes.Remove also removes links
Mar 1st, 2012 at 12:54pm
Print Post  
It seems that if I delete nodes from a diagram, it automatically removes any links that are attached to the node.  Is this behaviour by design?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram.Nodes.Remove also removes links
Reply #1 - Mar 1st, 2012 at 1:25pm
Print Post  
In most applications of graphs, links make no sense without nodes (they are defined as an ordered pair of nodes in the mathematical graph model) so they are removed by default. You might try setting a link's Origin or Destination to null before removing its respective node so that the link remains in the diagram. The control will actually associate the link with a DummyNode object in this case, and also when AllowUnconnectedLinks is enabled and the users draw an unconnected link. So if you need to find out whehter a link is disconnected, you must compare the type of its nodes with DummyNode.

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