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

[Question] Node height and width is not switched consistent in DOWN layout #1033

Open
BjBe82 opened this issue May 6, 2024 · 2 comments
Open
Labels
bug Erroneous behaviour.

Comments

@BjBe82
Copy link

BjBe82 commented May 6, 2024

Ask your questions
We observed the following behavior in a Graph, which was a little bit irritating. As it looks like, the ELK Layered Algorithm switches the minimum height/width of a Node if the layout direction is DOWN. But this is not consistent for all Nodes, i.e. this is not done for leaf nodes.
Question 1: Is it intended that the width and height is switched?
Question 2: What is the reason that the leaf element has not its width/height switched?

Advanced Example

Here is a simpler example: Small Example

Just remove/add C3, and the width/height of C2 is switched if C3 is present, or it is not switched if C3 was removed.

@BjBe82 BjBe82 added the question Request for support in using ELK. label May 6, 2024
@Eddykasp
Copy link
Contributor

Eddykasp commented May 6, 2024

This looks like a bug in elk.hierarchyHandling: INCLUDE_CHILDREN to me. In general that option is a bit unstable and I would recommend not using it if you don't strictly need it i.e. if you have no hierarchy-crossing edges. Even if you do have hierarchy-crossing edges you can split them into two edges and add a port to cross into other nodes.

no hierarchy handling

@Eddykasp Eddykasp added bug Erroneous behaviour. and removed question Request for support in using ELK. labels May 6, 2024
@BjBe82
Copy link
Author

BjBe82 commented May 7, 2024

Thanks for the fast answer. We are using elk.hierarchyHandling: INCLUDE_CHILDREN for a while now, since we have several hierarchy-crossing edges in the diagrams. But yes, we could think about some pre+post-processing to split the edges and then join them again after layout.

The question is what in addition to hierarchy-crossing edges support do we lose if we remove it. One thing which already comes to my mind is the direction which would need to be propagated down if there is more than one level from the root graph node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Erroneous behaviour.
Projects
None yet
Development

No branches or pull requests

2 participants