elk icon indicating copy to clipboard operation
elk copied to clipboard

Diffferent spacing.portPort configuration depending on whether there are edges or not

Open lredor opened this issue 5 years ago • 2 comments

As discussed on gitter, with the same configuration, the layout of ports of NodeA is not the same that NodeC. The "spacing.portPort" constraint is not respected for NodeC. image

Example usging spacing.individual: NodeA OK and NodeC KO.

As proposed by Ulf on gitter, if I use directly spacing.portPort directly for NodeC (not as override), the result is OK for NodeC, but KO for Node A. Example usging spacing.portPort directly: NodeA KO and NodeC OK.

To have a correct result for NodeA AND for NodeC, I have to duplicate the spacing.portPort information. It is OK as workaround but it seems to be a bug. Example with workaround: NodeA OK and NodeC OK.

lredor avatar Nov 23 '20 06:11 lredor

For completeness, as discussed on gitter:

The reason is that the two ports are turned into dummy nodes during layout of the interior of C. And while the portPort spacing is correctly used to space them apart, it is not retrieved from the correct node (being either the root or the individial override).

uruuru avatar Nov 23 '20 07:11 uruuru

Another problem appears, if labels are added to the port. Example with above workaround. The space between ports of NodeC is not of 5 pixels: image

lredor avatar Nov 25 '20 09:11 lredor