elk
elk copied to clipboard
NetworkSimplex's nodeFlexibility pushes edges to the border of nodes
Hi,
As seen in this example, using nodePlacement.networkSimplex.nodeFlexibility.default: NODE_SIZE somehow yields a weird layout where edges are pushed to the border:
Node 1 is positioned very weirdly to the right, for example. Also, the arrows leaving Node 3 leave at the edges of Node 3, while it would be nicer to have them placed at the center of the space where Node 3 and the nodes below overlap.
Is this a consequence of the algorithm, and is it possible to get a nicer layout through setting some other option?
would be nicer to have them placed at the center of the space
Definitely. However, the underlying optimization process has no notion of balance/symmetry.
and is it possible to get a nicer layout through setting some other option?
Unfortunately, no.
Thanks for the answers, I feared as much.
For now, I'll try to see if layouting in 2 passes could work: first with nodeFlexibility to determine appropriate node sizes, and then another one on the output of that but without the nodeFlexibility option set, in the hope that that puts the edges at a better location.