Open le-cds opened 5 years ago
This is solved by setting node size constraints to PORTS
and PORT_LABELS
.
I guess it should be enough to only set PORT_LABELS
for the node to resize to accommodate the label.
algorithm: layered
node n {
layout [ size: 20, 20 ]
nodeSize.constraints: "PORTS PORT_LABELS"
nodeSize.options: ASYMMETRICAL
portConstraints: FIXED_SIDE
portLabels.placement: "INSIDE ALWAYS_SAME_SIDE"
port p {
^port.side: SOUTH
label "long label"
}
}
Given the following graph:
This is the result:
There is clearly not enough space for the label. Centering it above its port would produce an additional crossing between the label and the node's left border. The port label placement code currently optimizes for such crossings and thus does not centre the label.
There could be an additional option to force centred port labels in such cases.