Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) How to create link between two given anchor points (Read 5746 times)
chris
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 57
Joined: Feb 1st, 2008
How to create link between two given anchor points
Apr 23rd, 2009 at 5:48pm
Print Post  
Hi Stoyan,

I defined several inlet and outlet anchor points for 2 ShapedNodes and want to create a link between 2 given anchor points.

But the diagram tool will choose the nearest anchor points to create link instead of the point I choose.

How can I prevent the diagram automaticlly using the nearest anchor point?

Thanks a lot!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to create link between two given anchor po
Reply #1 - Apr 23rd, 2009 at 7:08pm
Print Post  
Hi Chris, Is AutoRoute enabled for that link?
  
Back to top
 
IP Logged
 
chris
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 57
Joined: Feb 1st, 2008
Re: How to create link between two given anchor po
Reply #2 - Apr 23rd, 2009 at 8:39pm
Print Post  
Yes, I set RouteLinks to true for the Diagram.
I need the links avoid nodes but keep the given anchor point.

I try to set  diagram.RoutingOptions.Anchoring = Anchoring.Keep, but it doesn't work.

Is it possible to keep the given anchor points and avoid acrossing any other nodes in the same time?

Thanks, Stoyan!
  
Back to top
 
IP Logged
 
chris
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 57
Joined: Feb 1st, 2008
Re: How to create link between two given anchor po
Reply #3 - Apr 23rd, 2009 at 8:58pm
Print Post  
Hi Stoyan,

Actually, I found the diagram chooses the nearer  anchor point ( I have 2 and try to use another one.)to draw the link.

By the way, how to make sure the links are drawn on the top of ShapeNodes? I can't remember how to set Z order index for links now.

Thanks.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to create link between two given anchor po
Reply #4 - Apr 24th, 2009 at 8:26am
Print Post  
Hi Chris,

Apparently the routing functions sets the anchor points of new links before the method that chooses the one near the mouse position, and that code does not change the anchor when it sees it's already assigned. Our developer will fix this next week. For the time being, you could set AutoRoute from the LinkCreated handler. Then RoutingOptions.KeepAnchoring should work as expected.

Call DiagramLink.ZTop to move links in front of nodes.

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


I love YaBB 1G - SP1!

Posts: 57
Joined: Feb 1st, 2008
Re: How to create link between two given anchor po
Reply #5 - Apr 24th, 2009 at 2:36pm
Print Post  
Thanks, Stoyan.

I debugged and found if I set Link.AutoRoute to true and diagram.RoutingOptions.Anchoring = Anchoring.Keep, the anchor point will be changed when the node position is changed. If Link.AutoRoute is false, the anchor point is not changed.

When you fixed it, how can I get the patch?
  
Back to top
 
IP Logged
 
chris
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 57
Joined: Feb 1st, 2008
Re: How to create link between two given anchor po
Reply #6 - Jun 9th, 2009 at 7:19pm
Print Post  
Stoyo wrote on Apr 24th, 2009 at 8:26am:
Apparently the routing functions sets the anchor points of new links before the method that chooses the one near the mouse position, and that code does not change the anchor when it sees it's already assigned. Our developer will fix this next week.
I hope that helps,
Stoyan


Hi Stoyan,

I tried the latest dll, but it doesn't work. Would you please give me the link for the hotfix?

Thanks a lot!

The dll I used:https://mindfusion.eu/_beta/latest.diagramming.wpf.zip
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to create link between two given anchor po
Reply #7 - Jun 10th, 2009 at 5:08am
Print Post  
Hi Chris,

It's not available yet.

Stoyan
  
Back to top
 
IP Logged
 
chris
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 57
Joined: Feb 1st, 2008
Re: How to create link between two given anchor po
Reply #8 - Jun 10th, 2009 at 3:43pm
Print Post  
Hi Stoyan,

I'm wondering if it will be fixed in a hotfix or in the next release and what is your plan for next release.

By the way, I tried the following version. It works fine. The image quality is much better when you try to enlarge or shrink the images.

This version changes the type of all image properties to ImageSource:
https://mindfusion.eu/_beta/wpfdiag22.zip

Thanks a lot!

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to create link between two given anchor po
Reply #9 - Jun 11th, 2009 at 4:43am
Print Post  
Hi Chris,

We'll fix it for the 2.2 release in a few days.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to create link between two given anchor po
Reply #10 - Jun 29th, 2009 at 8:20am
Print Post  
Hi Chris,

Actually this seems to happen when the link's Dynamic property is enabled, and we consider it the correct result in this case. Can you verify if setting Dynamic = false stops the anchor points from being changed in your application?

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint