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

Positioning of children nodes further down #302

Open
bopeng95 opened this issue Oct 2, 2024 · 5 comments
Open

Positioning of children nodes further down #302

bopeng95 opened this issue Oct 2, 2024 · 5 comments
Labels

Comments

@bopeng95
Copy link

bopeng95 commented Oct 2, 2024

Is there some property I need to apply that positions a child 2 levels down to be closer to the parent if the 1st level has a node with an insanely large height? (this applies to any children on any level)
For Example: Elk JSON

Screenshot 2024-10-02 at 6 27 06 PM

I was able to use alignment: 'TOP' to have the 1st child node on the right positioned at the top, but my goal is to have the 2 left and right subtrees be independent of one another so that the 2nd child on the right will be positioned closer and not on the 3rd layer (below the maximum height node from 2nd layer)

I am trying to prevent having to create a subgroup per new child.

@soerendomroes
Copy link
Member

You can try using a compaction strategy.

@bopeng95
Copy link
Author

bopeng95 commented Oct 7, 2024

ty for the response! it does work to a certain extent to what I was expecting, It could be part of the elk's algorithm but as I added more nodes in this example, node n9 is pushed to the bottom but alignment TOP did not work.
For nodes 10, 11, 12, they are not evenly aligned at the top either (picture is something I was expecting)
Screenshot 2024-10-07 at 12 20 21 PM

If i add edgerouting POLYLINE, it is similar to what I need, but the compaction strategy does not work with edge routing is this correct?

@bopeng95
Copy link
Author

bopeng95 commented Oct 7, 2024

Here is another good example of n7 and n9 being pushed down, i think it is because the graph is trying to reduce the gap horizontally? and minimize empty space. My goal essentially would just be each child to be in its own tree regardless if it needs to push the sibling nodes out creating a big horizontal gap
Example
Screenshot 2024-10-07 at 1 10 55 PM

@soerendomroes
Copy link
Member

If this is the case, I suggest introducing hierarchy to achieve this (and make the hierarchical node invisible).

@bopeng95
Copy link
Author

bopeng95 commented Oct 8, 2024

i see, seems like sub flow is the only way to achieve this, i would need to apply child to a child for every node. Not sure if I want to go that route.

Thanks for the help!

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

2 participants