buy now
log in
MindFusion

Q: I load my nodes, which derive from CompositeNode, from XML. Then I apply a custom layout algorithm, which just changes the position of the nodes. No matter what I try, diagram links always start and end in the middle of the nodes. Any ideas what to do?

A: Diagram links are created between the middle of the nodes when they are created between overlapping nodes e.g. before you have applied the layout. In this case the control does not know how to choose intersaction points and the middle of the node is taken by default. If you set

link.Dyanamic = true; 

the control would realign the links to the borders of the node after the node is moved (presumably by your layout algorithm).

Another option is to call ReassignAnchorPoints after the call of your layout method.

Copyright © 2001-2024 MindFusion LLC. All rights reserved.
Terms of Use - Contact Us