Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to align to anchorpoint? (Read 2413 times)
ncepu
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 25
Joined: Mar 5th, 2012
How to align to anchorpoint?
Jun 7th, 2012 at 2:43am
Print Post  
How can I automatically make one ShapeNode align to the anchorPoint of another ShapeNode.Like the attanchment file.The ShapeNode which has the anchorpoints can resize in Horizontal.
  

example_002.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to align to anchorpoint?
Reply #1 - Jun 7th, 2012 at 7:49am
Print Post  
You could align the dependent nodes from the NodeModified / NodeModifying events raised for the node containing anchor points. You can find the diagram location of an anchor point like this:
float x = node.Bounds.X + node.Bounds.Width * ap.X / 100;

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
ncepu
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 25
Joined: Mar 5th, 2012
Re: How to align to anchorpoint?
Reply #2 - Jun 7th, 2012 at 12:48pm
Print Post  
Because there twenty anchorpoint.How to get the anchorpoint which one shapenode connected to when I drawing a link between the two nodes.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to align to anchorpoint?
Reply #3 - Jun 7th, 2012 at 5:41pm
Print Post  
You can find it form the link's OriginAnchor and DestinationAnchor properties, which specify index within the AnchorPattern.Points collection.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
ncepu
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 25
Joined: Mar 5th, 2012
Re: How to align to anchorpoint?
Reply #4 - Jun 8th, 2012 at 2:31am
Print Post  
I make it,thanks.I have some other problem yet.
When two nodes is very close,how to select the link between the two nodes.I guess it's the problem of the defining of my shapenode,I don't know how to solve it.
Thanks in advance.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to align to anchorpoint?
Reply #5 - Jun 8th, 2012 at 7:15am
Print Post  
If the link is over these nodes, setting HitTestPriority to ZOrder should let you select it.

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