Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic New Anchor when Link is Modified (Read 1691 times)
benjamin huser
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Oct 23rd, 2014
New Anchor when Link is Modified
Oct 20th, 2016 at 10:59am
Print Post  
Hi there

I have a problem when I we modify a Link. Say we connected two nodes, now I drag and drop the link from the original origin to a third node.
When the user drops it on the that node, I get in the EventHandler for the LinkModified event and have the LinkEventArgs as parameter.

In there I get the Link with the correct new Origin. But as Origin Anchor, I will always get the "old" anchor point from the previously selected node, no matter to which "new" point I connect.
How can I figure out the new point, as we need this information to update our internal model? I did not find this information either in the "OnLinkModifying" Event. There we have additionally the "AnchorIndex" property, which I tried as well, but it is always -1...

Thanks for your help.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3148
Joined: Oct 19th, 2005
Re: New Anchor when Link is Modified
Reply #1 - Oct 20th, 2016 at 1:21pm
Print Post  
Hi,

This shows correct index for me -

Code
Select All
private void OnLinkModified(object sender, LinkEventArgs e)
{
	Debug.WriteLine(
		e.Link.OriginAnchor);
} 



Verify SnapToAnchor is set to OnCreateOrModify or otherwise the link would not connect to anchor point at all. Also make sure you are really moving the origin point and not destination one (could be mixing them if BaseShape is set too).

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
benjamin huser
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Oct 23rd, 2014
Re: New Anchor when Link is Modified
Reply #2 - Oct 21st, 2016 at 6:27am
Print Post  
Hi Slavcho

I think the problem was that we were cancelling the modifying event under some (wrong) conditions.
I played around with our settings there and now it seems that I get the correct anchors.

Thanks for your help
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint