I recently updated my version of GoDiagram, and there seems to be a
change in the functionality of the layereddigraphs. Specifically, the
links, and their FromPorts seem to have changed.
When creating the flowchart, I set these properties:
layout.DirectionOption = GoLayoutDirection.Down
layout.AggressiveOption = GoLayoutLayeredDigraphAggressive.More
layout.LayeringOption = GoLayoutLayeredDigraphLayering.OptimalLinkLength
and when creating the individual links, I set these properties:
link.Orthogonal = True
link.AvoidsNodes = True
Do you have any suggestions as to what settings I can use to correct this linking?
Thanks for any advice you can give.
Here is a picture of how the new version is rendering:
Here is a picture of how the old version would render (2.6.2):
I’m not sure what the problem is, precisely, but you can get around it by doing something like:
[code] goView1.StartTransaction();
GoLayoutLayeredDigraph layout = new GoLayoutLayeredDigraph();
layout.Document = goView1.Document;
layout.DirectionOption = GoLayoutDirection.Down;
// any other initializations…
layout.PerformLayout();
// improve routing of “backwards” links:
foreach (GoObject obj in goView1.Document) {
GoLabeledLink l = obj as GoLabeledLink; // or GoLink, if that’s what you are using
if (l != null && l.AvoidsNodes && l.FromPort.GoObject.Top > l.ToPort.GoObject.Top) l.CalculateRoute();
}
Not sure what has caused the behavior but, I am not dealing with charts that are terribly big so, this extra bit shouldn’t have too much of an affect on performance.