-
Notifications
You must be signed in to change notification settings - Fork 97
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: How to force centering of the graph? #224
Comments
Elk-live is online again. By just quickly looking at your layout options, I would try removing |
ELK Layered cannot do this, but MrTree seems to be able to create such drawings as seen here. |
Yup, it seems to always produce a balanced tree. However, there is one drawback involved. MrTree doesn't support orthogonal edge routing, does it? |
Correct, MrTree does not support different edge routing styles and generally supports fewer features. Since it seems fairly trivial, we could also try adding a balanced node placement algorithm for ELK Layered. In the meantime, you could also use MrTree and calculate the edge routes yourself since they seem to be rather trivial. |
I'm aware it's not trivial to implement such a feature in a short time. I'll have to dig deeper into this and, as you said, try to implement edge routing by myself. Thanks for your time and help! |
Hi, thanks for your work on this great library!
I'm working on a graph editor and stumbled upon a problem. There is a business requirement saying that a graph must always be centred. I'm trying to somehow impose this restriction on the Elk, but without success so far.
This is what I want to achieve. The graph is centred and if there are multiple edges coming out from a node they are symmetric. Nodes can have between 1-3 outputs. Edges coming from them are always visible and connected to placeholder/virtual nodes. If a user drags a node from a toolbar over a placeholder, it becomes a drop indicator.
However, it falls apart in more complex scenarios like this:
The graph is no longer centred, it's visually shifted to the right. Also, if you look at the edges on the left side of the graph, you will see they aren't symmetric anymore.
This is my configuration:
I would love to provide a reproduction using Elk-live editor, but the page it's hosted on is not responding.
Please let me know if you need to know more in order to help me. I will provide the required details as soon as possible.
Thanks for your help!
The text was updated successfully, but these errors were encountered: