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

Support for other node shapes? #201

Open
BenPortner opened this issue Nov 21, 2022 · 1 comment
Open

Support for other node shapes? #201

BenPortner opened this issue Nov 21, 2022 · 1 comment
Labels

Comments

@BenPortner
Copy link

Dear elkjs developers,

Thank you very much for this great graphing library! I am just getting started and I am wondering: Is it possible to make the layout account for node shapes other than rectangles (e.g. ellipses)? I don't think this should affect the positioning of the nodes themselves, but rather of the edges and their start and end points.

Thank you.
Ben

@soerendomroes
Copy link
Member

Hi, in ELK (the Java version) we solve this via pre and postprocessing (for our use case this is done in KLighD).
We precompute the outer rectangle and adjust the padding to fit text and other elements inside the ellipsis. More information should be linked in the KLighD repository.
Therefore, we are unlikely to add this functionality in ELK and, subsequently, in elkjs. If we would add support for different node shapes then it would most likely affect the positioning of nodes too.
Since this is an interesting but also quite complicated topic, I don't think we are able to do this for quite a while.

However, we plan to add a pre and postprocessing library for elkjs (which we may call klighd-js). But this will also take some time.

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

No branches or pull requests

3 participants