Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Removing the association of a link to a shapenode (Read 3305 times)
solisgsandc
YaBB Newbies
*
Offline



Posts: 40
Joined: Dec 18th, 2009
Removing the association of a link to a shapenode
Feb 1st, 2010 at 9:10pm
Print Post  
Once a shape node and a link is connected, I would like to be able to remove the connection if I move the link outside of the node. However, moving it ouside the node does not really remove the connection. When moving the node, the link also moves as if it is connected.

Is there a property that I could set that once the link is removed and dropped outside of the node that it is disconnected?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Removing the association of a link to a shapen
Reply #1 - Feb 1st, 2010 at 11:42pm
Print Post  
Have you tried AllowUnconnectedLinks?
  
Back to top
 
IP Logged
 
solisgsandc
YaBB Newbies
*
Offline



Posts: 40
Joined: Dec 18th, 2009
Re: Removing the association of a link to a shapen
Reply #2 - Feb 2nd, 2010 at 3:59pm
Print Post  
Yes. I used that property already.

Is there an event that tells me that the link has been modified and then I can check if it intersects with the Destination or Origin shapeNode.

If It does not intersect then I assign the destination or origin part of the link to a Dummy Node. Is this the way to disconnect so that the link does not move when I move the shape node.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Removing the association of a link to a shapen
Reply #3 - Feb 2nd, 2010 at 5:08pm
Print Post  
Yes, I think that doesn't work as expected. You can handle LinkModified and set Origin or Destination = null if the user dragged an end point and the respective node does not contain the current point location.
  
Back to top
 
IP Logged
 
solisgsandc
YaBB Newbies
*
Offline



Posts: 40
Joined: Dec 18th, 2009
Re: Removing the association of a link to a shapen
Reply #4 - Feb 3rd, 2010 at 3:44pm
Print Post  
I believe that works but causes the link to move.

Is it a problem if I create a new DummyNode and then set the bounds of the DummyNode to the x,y coordinates of the corresponding Link endpoint? After that, I then set the Origin or Dest to the DummyNode. I was just thinking that I need the link to keep its end point coordinates when I do this. This works for me.

However if setting it to null the link endpoint goes to {0,0} coordinates. Do you believe that I will be creating orphaned Dummy Nodes in the diagram at some point and that will create some performance issue.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Removing the association of a link to a shapen
Reply #5 - Feb 3rd, 2010 at 6:51pm
Print Post  
You could clone the ControlPoints collection before setting the Origin and assign the points back after that. We'll send you a fix for AllowUnconnectedLinks anyway, it should be ready tomorrow.
  
Back to top
 
IP Logged
 
solisgsandc
YaBB Newbies
*
Offline



Posts: 40
Joined: Dec 18th, 2009
Re: Removing the association of a link to a shapen
Reply #6 - Feb 3rd, 2010 at 7:23pm
Print Post  
Ok. So If you are giving a fix for this issue and my company bought source code, do we get the source code fixes as well?

Also, is there a problem with my dummynode solution?

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Removing the association of a link to a shapen
Reply #7 - Feb 3rd, 2010 at 7:37pm
Print Post  
Yes, you'll get the code. There's nothing wrong with your solution - it should not create orphaned nodes, but you could use the shared Diagram.Dummy instance just in case.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Removing the association of a link to a shapen
Reply #8 - Feb 4th, 2010 at 2:14pm
Print Post  
You can now download it from your account here: http://clientsarea.eu/
  
Back to top
 
IP Logged
 
solisgsandc
YaBB Newbies
*
Offline



Posts: 40
Joined: Dec 18th, 2009
Re: Removing the association of a link to a shapen
Reply #9 - Feb 8th, 2010 at 8:30pm
Print Post  
Thanks. Where can I find all the features or bug fixes for this version?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Removing the association of a link to a shapen
Reply #10 - Feb 9th, 2010 at 9:30am
Print Post  
There are no new features; just a fix for this and a problem where null arrowheads were deserialized as non-null ones.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint