Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Require link at the LeftCenter of the node (Read 1917 times)
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Require link at the LeftCenter of the node
Nov 9th, 2009 at 9:52am
Print Post  
Hi,

We have some ShapeNodes and Links in our diagram. We are using custom anchor point to draw link from this anchor.

The code for the custom implementation is:
Code
Select All
AnchorPattern aPattern = new AnchorPattern(new AnchorPoint[]
	  {
	  new AnchorPoint(82,22,false,false,MarkStyle.Circle,new SolidColorBrush(Colors.Brown))
	  });
				mainNode.AnchorPattern = aPattern; 

.

When we draw link, it is created from that point but have two small issues.

1). Link should touch only to node's border; it should not overlap with the node. [For that I have already set link.Dynamic= true; but it is not working]

2). I need LeftInRightOut behavior with this custom implementation i.e. link should start from source's LeftCenter to destination's RightCenter.


Please suggest on these.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Require link at the LeftCenter of the node
Reply #1 - Nov 9th, 2009 at 12:51pm
Print Post  
Hi Anshul,

1. Anchor points coordinates are specified in percents. E.g. if the size of your nodes is 82x44 points, you shouldn't set the anchor point at 82,22 but at 100,50.

2. You should add points at 0,50 and 100,50, with the two boolean arguments set to true, false for the incoming point and false,true for the outgoing point.

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: Require link at the LeftCenter of the node
Reply #2 - Nov 9th, 2009 at 1:02pm
Print Post  
I think you didn’t got my queries.

1). My anchor point is at the same position where I want it to be but the thing which need to be change is the position of the link that is created from this point. Currently my anchor is app. TopRight position of the node but I need outgoing link from the RightCenter of the node.

2). I don’t want to create two anchor; I want only one anchor that is at the TopRight position of the node. If I draw link from this point than at the time of creation it should adjust itself to RightCenter (source) and LeftCenter(Destination).

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Require link at the LeftCenter of the node
Reply #3 - Nov 9th, 2009 at 2:23pm
Print Post  
Do you need to display the anchor point at one place but connect the links to another one? This is not supported; instead, you will have to use invisible anchor points to define the allowed connection positions and handle custom drawing events to render what you call an "anchor point".

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