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

Having a way to support sorting nodes on the same level in hierarchical Layout #926

Open
laike9m opened this issue Aug 7, 2020 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@laike9m
Copy link

laike9m commented Aug 7, 2020

When using the hierarchical Layout, level is used to specify which hierarchy a node locates. Based on these Stack Overflow questions:

It seems there's no way to specify the order of nodes placed on the same level. Please correct me if I'm wrong on that.

I can think of two ways to solve or mitigate this issue:

  1. Describe the current rule in documentation, e.g.

    Order on the same level is purely determined by node insertion order.

  2. Add another attribute to node which, if specified, is used to determine the order.
@Thomaash Thomaash added enhancement New feature or request help wanted Extra attention is needed labels Aug 8, 2020
@laike9m
Copy link
Author

laike9m commented Aug 8, 2020

@Thomaash Hi Tomáš, could you help me confirm whether "Order on the same level is purely determined by node insertion order" is true? That can already help me a lot. Thanks!

@Thomaash
Copy link
Member

Thomaash commented Aug 8, 2020

As far as the public API goes: No, the order is not guaranteed in any way, do not rely on it, it may change with any new release or between browsers.

As far as the CURRENT implementation and decent browsers go: Yes.

@laike9m
Copy link
Author

laike9m commented Aug 8, 2020

Got it, thanks.

@laike9m
Copy link
Author

laike9m commented Aug 8, 2020

BTW, I know I shouldn't use GitHub to ask questions, but I have an urgent one: https://stackoverflow.com/q/63314093. If possible, could you help take a look? I really appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants