elk
elk copied to clipboard
Self-Loop Edge Labels Affect Edge Routing for Fixed Ports
When using fixed position ports with self-loop edges, having an edge label causes unnecessary bendpoints to be added. Related to #79?
Example:
graph G1
elk.direction: RIGHT
hierarchyHandling: SEPARATE_CHILDREN
algorithm: org.eclipse.elk.layered
nodeLabels.placement: "[]"
minimum: "(100.0,100.0)"
node N1 {
node N2 {
layout [
position: 12, 12
size: 152, 100
]
nodeSize.constraints: "[MINIMUM_SIZE]"
insideSelfLoops.activate: true
portConstraints: FIXED_POS
minimum: "(255.0,100.0)"
port P2 {
layout [
size: 20, 16
position: 0, 55
]
side: WEST
borderOffset: -20.0
}
port P5 {
layout [
size: 20, 16
position: 0, 55
]
side: EAST
borderOffset: -20.0
}
}
edge E1: N2.P2 -> N2.P5 {
yo: true
label L1: "test_label" {
layout [ size: 47, 21 ]
}
}
}

Were you able to reproduce this issue?
Yep, the issue is still there. The problem is due to how we handle fixed hierarchical port positions and might not be that easy to fix. I cannot guarantee whether we'll be able to fix this for 0.4.0.
If it's all the same to you, an easy workaround is to set port constraints to FIXED_SIDE.
I understand. Unfortunately, there are contributing factors which make fixed_side not a feasible option.
I feared as much. I'll see what we can come up with, but don't hold your breath. There won't be an easy fix and I have to see when we find time to fix this. :/
Understood. Thanks for looking into it!