elk icon indicating copy to clipboard operation
elk copied to clipboard

Self-Loop Edge Labels Affect Edge Routing for Fixed Ports

Open philip-alldredge opened this issue 8 years ago • 5 comments

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 ]
		}
	}
}

example

philip-alldredge avatar Nov 29 '17 19:11 philip-alldredge

Were you able to reproduce this issue?

philip-alldredge avatar Feb 14 '18 16:02 philip-alldredge

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.

le-cds avatar Feb 20 '18 09:02 le-cds

I understand. Unfortunately, there are contributing factors which make fixed_side not a feasible option.

philip-alldredge avatar Feb 20 '18 14:02 philip-alldredge

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. :/

le-cds avatar Feb 20 '18 14:02 le-cds

Understood. Thanks for looking into it!

philip-alldredge avatar Feb 20 '18 14:02 philip-alldredge