Weird link auto layout with LayeredDigraphLayout from side-to-side links


I’m using GoXAM 2.2.1 on Windows 7, 64-bit.

I am using a node template like the one of the Flow Chart example, i.e. I have four spots with ports defined for links. Layout is LayeredDigraphLayout, Angle=90. My nodes can have more than one parent nodes and more than one “children” nodes.

Now, when I link the port on the left side (middleLeft) to the middleLeft port of another node (which is located beneath/south of the parent node), everything looks fine, as long as the layouter is deactivated (with layout conditions).
That is, the link takes following route: the link leaves the node horizontally, then moves at a 90 degree angle straight down, takes another 90 degree angle and horizontally enters the connected node.
But when I trigger an automatic layout, the link takes a more or less direct path to the port of the connected node. Thereby, the link is drawn “above” its own node and the target node up to the connected port, which looks weird. The path is currently set to “normal”, but with “orthogonal” it also looks awful and shows the same behaviour (just with some orthogonal bends).

Any help is appreciated.

Kind regards,

The default routing behavior of LayeredDigraphLayout is to assume that for angle/direction == 90 the links always have their Link.Route.FromSpot set to Spot.MiddleBottom and the ToSpot set to MiddleTop.

You can disable that routing behavior by setting LayeredDigraphLayout.SetsPortSpots to false.

A post was split to a new topic: Straight link routing with LayeredDigraphLayout