elk
elk copied to clipboard
Tree Layout with vertical position constraints
resolves #861 Implementation of a tree layout that can handle vertical position constraints for nodes. Created in the scope of the bachelor thesis of cln.
Todos:
- [ ] considerNodeModelOrder option is broken is some situations
- [ ] node sizes are not correctly determined in some cases (e.g. when using node micro layout)
- [ ] add tests
Sample ELK graph:
node wrapper {
algorithm: org.eclipse.elk.vertiflex
spacing.nodeNode: 5
layerDistance: 40
elk.padding: "[top=0.0,left=0.0,bottom=10.0,right=0.0]"
layoutStrategy: BEND
node n1 {
verticalConstraint: 115
label "n1"
}
node n2 {
verticalConstraint: 400
label "n2"
}
node n3 {
verticalConstraint: 160
label "n3"
}
edge n1 -> n2
edge n1 -> n3
node n4 {
verticalConstraint: 300
label "n4"
}
node n5 {
verticalConstraint: 280
label "n5"
}
node n6 {
label "n6"
}
node n7 {
label "n7"
}
node n8 {
label "n8"
}
edge n3 -> n4
edge n3 -> n5
edge n3 -> n6
edge n3 -> n7
edge n3 -> n8
}
Straight edges vs preserved model order
@Eddykasp could you add a check-list to highlight what is still missing here?
Could you add a test for the "I do layout twice and everything breaks" problem?