Skip to content

layered.mergeEdges and layered.considerModelOrder.strategy seem to conflict #1172

@SmithKy3

Description

@SmithKy3

Describe the bug
I've come across an issue where using the layered.considerModelOrder.strategy option set to PREFER_NODES can lead to a different layout as soon as you use it in conjunction with the layered.mergeEdges option.
I have a tree with 3 layers with one node in each. I have two edges connecting the nodes in each layer and then a 3rd edge connecting the node in layer one to the node in layer three.
I want the order of the long edge and the node in layer 2 to be decided by the order of the nodes in the model.
As you can see in this elklive example though, using the mergeEdges option breaks that ordering.

I'm using elk with ReactFlow and have managed to work around the issue. I've added my workaround to that elklive example just in case it's useful to anyone with the same problem. The edges don't actually meet in elklive, I suspect because the client's adding some default layout options for ports, but it works perfectly for me outside of elklive. Either way, I thought i'd report so I can either find out why this happens or, if it is indeed a bug, so it gets fixed.

Expected behavior
When using the layered.considerModelOrder.strategy option in PREFER_NODES mode, node placements should be consistent regardless of the layered.mergeEdges option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    alg-layeredAffects the ELK Layered algorithm.bugErroneous behaviour.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions