Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Nodes and AnchorPoints (Read 2929 times)
kc13
YaBB Newbies
*
Offline



Posts: 29
Joined: Jan 19th, 2009
Nodes and AnchorPoints
Feb 8th, 2010 at 4:43pm
Print Post  
I have a generic routine to create links  between various nodes at runtime.  It calls CreateDiagramLink method.  How can I prevent my TableNodes from anchoring to the "row" anchorpoint instead of the node anchorpoint? 

I have predefined anchorpatterns for both nodes and tablenode rows.  But, it appears as though the CreateDiagramLink method is not differentiating between when to connect to the node anchorpoint.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Nodes and AnchorPoints
Reply #1 - Feb 8th, 2010 at 6:15pm
Print Post  
Try to (temporarily) switch the tables ConnectionStyle to Table.

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



Posts: 29
Joined: Jan 19th, 2009
Re: Nodes and AnchorPoints
Reply #2 - Feb 9th, 2010 at 2:33pm
Print Post  
Thanks for the suggestion, that got me a little further along.

Another question now... I now have a link that is anchored to a row in a TableNode.  How can i "get" the anchor point for that link later on in code?  The properties for the Origin and Destination, etc, seem to be relative to the node and not the actual row that it is anchored to.  Basically, I need to update the controlpoints for the link when the nodes move.  So, I guess I need to be able to identify te location of the origin row's anchorpoint to assign to the controlpoint of the link?  This is a workflow diagram so I cannot use any of the auto layout features.  The scrolling table and whether or not the row is visible is another issue for the links.

Hopefully you can understand my question...

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Nodes and AnchorPoints
Reply #3 - Feb 9th, 2010 at 3:50pm
Print Post  
Hi,

You can get the table rows related to a link via the OriginIndex and DestinationIndex properties. Then use OriginAnchor and DestinationAnchor to get the index of the point within the row's AnchorPattern.

You can call GetSpannedCellRect for the first cell on a row and compare the rect's Y with table.Bounds.Bottom to find out if a row is visible.

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



Posts: 29
Joined: Jan 19th, 2009
Re: Nodes and AnchorPoints
Reply #4 - Feb 9th, 2010 at 6:57pm
Print Post  
Thanks... that helped.

I am having some odd results at times, and I'm not sure yet but wondering if temporarily setting the connectionstyle on a table (that already has links to a row) would cause the link to "reconnect" to the table anchor point?  That "seems" to be happening.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Nodes and AnchorPoints
Reply #5 - Feb 9th, 2010 at 7:14pm
Print Post  
Are you using the Dynamic property of links? Also check the RoutingOptions.Anchoring property value if using auto-routing.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint