Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layered PREFER_NODES not respected if mergeEdges and edges have labels #1091

Open
keyserj opened this issue Nov 19, 2024 · 1 comment
Open
Labels
bug Erroneous behaviour. enhancement An improvement to existing functionality.

Comments

@keyserj
Copy link

keyserj commented Nov 19, 2024

Describe the bug
I sort my model by node type, so that nodes of a type are grouped together, like so:
image

However, if I add edge labels and set mergeEdges: true, model node order seems to be ignored. Here is an elklive to show the issue (hopefully link works, it seems like elklive was down so I ran it locally and just appended the compressedContent onto the live URL):
image

I recently learned that edge labels are treated like nodes during layout, and I wonder if this is related.

What I've tried:

  • forceNodeModelOrder: true - works but I don't want to ignore crossing minimization
  • crossingCounterNodeInfluence: 1 - theoretically seems like it should prioritize model order such that crossing minimization is ignored, same as forceNodeModelOrder (then I could try to tune to a smaller number), but it doesn't seem to fix the issue
  • sorting edge model order in addition to nodes (still using PREFER_NODES) - works, seems like my best workaround for now, but PREFER_NODES seems like it's intended to function without caring about edge order

ELK Version
ELK snapshot/0.9.1

Additional context
Up until recently, I've ignored edge output from ELK, just drawing a simple bezier instead for each edge from source to target, and plopping the edge label on the midpoint. But there's a lot of edge/edge-label overlap, so I'm trying to include edge labels in the layout, and use the edge output to actually draw the lines/labels (hence my desire to also set mergeEdges: true).

@keyserj keyserj added the bug Erroneous behaviour. label Nov 19, 2024
@soerendomroes soerendomroes added the enhancement An improvement to existing functionality. label Nov 20, 2024
@soerendomroes
Copy link
Contributor

I think model order does just not work correctly with hyperedges. Any considerModelOrder strategy just sorts the ports and sometimes, the nodes. If however all edges have only one port, this does not work.

I will mark this as an improvement.

@soerendomroes soerendomroes added this to the Release 0.10.0 milestone Nov 20, 2024
keyserj added a commit to amelioro/ameliorate that referenced this issue Nov 24, 2024
and sort edges by node type in addition to nodes.

because the `mergeEdges` option (which will be needed for
drawing edges that avoid each other) results in the
PREFER_NODES strategy no longer being respected.

see eclipse-elk/elk#1091
keyserj added a commit to amelioro/ameliorate that referenced this issue Nov 24, 2024
and sort edges by node type in addition to nodes.

because the `mergeEdges` option (which will be needed for
drawing edges that avoid each other) results in the
PREFER_NODES strategy no longer being respected.

see eclipse-elk/elk#1091
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Erroneous behaviour. enhancement An improvement to existing functionality.
Projects
None yet
Development

No branches or pull requests

2 participants