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

Layout option to force global container: root coordinates for all children and edges #1012

Open
snelsi opened this issue Mar 29, 2024 · 7 comments · May be fixed by #1071
Open

Layout option to force global container: root coordinates for all children and edges #1012

snelsi opened this issue Mar 29, 2024 · 7 comments · May be fixed by #1071
Labels
question Request for support in using ELK.
Milestone

Comments

@snelsi
Copy link

snelsi commented Mar 29, 2024

New to Elk , I will be glad for any help.

I have a nested layout with cross-parent edges.
After enabling "hierarchyHandling": "INCLUDE_CHILDREN" layout option, I noticed that some of the edges are using startPoint / endPoint sections relative to the container coordinates they are located.

Is there a layout option I can enable to force all children and edges to use global container: root coordinates instead?

@lredor
Copy link
Contributor

lredor commented Mar 29, 2024

Hi snemsi,
You have a documentation about coordinates system here.
There is no link between this coordinates system and the layout options.
Regards,
Laurent

@snelsi
Copy link
Author

snelsi commented Mar 29, 2024

Sorry, I don't follow you. Is there a way to force all childrens/edges to use global root coordinates?

@lredor
Copy link
Contributor

lredor commented Apr 2, 2024

No, not that I know of.

@Eddykasp Eddykasp added the question Request for support in using ELK. label Apr 9, 2024
@Eddykasp
Copy link
Contributor

Eddykasp commented Apr 9, 2024

Hi @snelsi, as I understand it, you want to be able to configure whether to use absolute or relative coordinates. This is currently not possible and also probably out of the scope of ELK. Is there any obstacle to simply computing the absolute coordinates from the layout results produced by ELK?

@Eddykasp Eddykasp closed this as completed Apr 9, 2024
@soerendomroes soerendomroes reopened this Apr 9, 2024
@soerendomroes
Copy link
Contributor

This should be addressed when fixing #901

@snelsi
Copy link
Author

snelsi commented Apr 9, 2024

@Eddykasp,

I'm currently using elkjs along with xyflow/react and integrating my custom edge renderer.

xyflow organizes nodes and edges separately into two flat arrays without nested hierarchy. While it handles nodes with parent-relative coordinates well, I'm unsure if it can manage edges with parent-relative coordinates.

This means I have to calculate and convert all edges to absolute coordinates, which is a bit inconvenient and increases the chance of mistakes.

I had hoped that elk would provide an option to use flat children/edges output with absolute coordinates.

@Eddykasp
Copy link
Contributor

I see, I previously misunderstood the problem.

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

Successfully merging a pull request may close this issue.

4 participants