elk
elk copied to clipboard
Positioning of inline labels is off in vertical layout
I assume inline labels to be centered on their parent edge, i.e. the label "i" of the following graph should completely overlay the edge behind it. In reality though the label if offset by 1-2 pixels to the left.
elk.direction: DOWN
node a
node b
edge a -> b {
label "i" {
edgeLabels.inline: true
}
}
Causes issue kieler/KLighD#116
I tried to just add 1 pixel:
It does not always seem to be the case (as seen below) that this fixes the issue.
But in some models it seems to be correct:
elk.direction: DOWN
considerModelOrder.components: FORCE_MODEL_ORDER
node a
node b
edge a -> b {
label "i" {
edgeLabels.inline: true
}
}
node c
node d
edge c -> d {
label "w" {
edgeLabels.inline: true
}
}
node e
node f
edge e -> f {
label "i" {
edgeLabels.inline: true
}
}
The issue seems to be the edgeLabel spacing (which is 2.0) per default.