This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I has written code that automatically lays out the diagram. I want to enable the user to play with the diagram and then click a button to snap it to a clean layout. Right now, I have code like the following. The nodes move to the right place, but the connections do not. Is there a way to get the Connections to update themselves as nodes move? I want to animate this, so it should be event driven and reasonably high performance to avoid flicker. private void LayoutDiagram(FlowDiagramLayout layout)
N.B. FlowDiagramLayout is just a Dictionary<FlowDiagramNode, Rect> |
|
|
Hello varigence When working on the star diagramming product, I made a method on DiagramSurface called FormatAllConnectionElements. This applies formatting to all the connection elements, including appliying the path-finding algorithm to them. Although, I believe you may not have this method in your copy of DiagramSurface. In the method you have outlined, do you have access to an instance of DiagramSurface? In terms of performance, the method I just mentioned should be useful to you as you could call it after you foreach loop which should be the fastest way to apply path-finding to all the connections. Cheers |
|
|
Yes, a FormatAllConnectionElements method on DiagramSurface would work for me. In my case, just extended DiagramSurface to add the layout capabilities. Consequently, you could even make it protected if there was a compelling reason to do so.
Thanks, -Scott |
|
|
Very well We shall get this into a nightly build as soon as possible. Regards |
|