Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Custom Anchor Pattern Require For Link (Read 2727 times)
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Custom Anchor Pattern Require For Link
Jun 24th, 2010 at 1:55pm
Print Post  
Hi,

We are having some ShapeNodes and some DiagramLinks in our application. We are using CustomAnchorPoints for the nodes.

Scenario:

There are two ShapeNodes say A and B.
There are two links between A and B.
             •Link1 which is unidirectional (From A to B, B has the link pointer)
             •Link2 which is bidirectional

Requirement:

We want unidirectional link should be connected from A's BottomCenter to B's TopCenter and bidirectional link should be connected from A's RightCenter to B's LeftCenter.

Problem:

We can assign only one AnchorPattern instance to the node at a time. Here in this case we need two AnchorPattern instance over the node, Right?

What could be the way by which we can identify which AnchorPattern link should follow to connect to the node in such a way that a single node can have two or more instances of AnchorPattern at the same time?

Please suggest.

Regards,
Anshul
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Custom Anchor Pattern Require For Link
Reply #1 - Jun 24th, 2010 at 5:56pm
Print Post  
Hi,

You can use one AnchorPattern object that contains all four points. Handle the ValidateAnchorPoint event to filter out some of the points, depending on the link type.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Custom Anchor Pattern Require For Link
Reply #2 - Jun 26th, 2010 at 11:17am
Print Post  
Hi,

I have used link.OriginAnchor and link.DestinationAnchor to set my anchor point on the basis of a property. It is working fine but sometimes when I move the node, link gets aligned with another anchor point which I don’t want. Can you guess what could be the reason?

One more issue, as I have mentioned earlier, I am using one another Anchor (at TopRight) to create link other than these four Anchors, that Anchor cannot have Incoming and Outgoing links. When I am trying to create link from this Anchor, control automatically moves to RightCenter Anchor and link is appearing creating from that Anchor. Can you please suggest what is happening, why I am not able to draw link from first Anchor?

Regards,
Anshul
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Custom Anchor Pattern Require For Link
Reply #3 - Jun 28th, 2010 at 7:44am
Print Post  
Hi,

1. It could happen if the link's Dynamic property is enabled, or if AutoRoute is enabled and RoutingOptions.Anchoring == Reassign.

2. I suppose you'll have to enable outgoing links for that point, and later change the link's OriginAnchor in response to LinkCreated if existing links should not actually connect to that point.

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