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

fix(hierarchical): ignore invisible nodes #270

Merged
merged 2 commits into from
Nov 28, 2019
Merged

Conversation

Thomaash
Copy link
Member

The layout originally made space for invisible nodes (for example after clustering). Now it takes into account only the nodes that are actually rendered solving the problems with sometimes huge empty spaces in hierarchies with clusters.

Also the Hierarchical Layout Methods example was modified to show clustering. It was actually mostly rewritten with new design, various code style improvements and more detailed info added atop of clustering.

PS: Merge #268 into this branch to make the errors go away.

The layout originally made space for invisible nodes (for example after
clustering). Now it takes into account only the nodes that are actually
rendered solving the problems with mysterios empty spaces in hierarchies
with clusters.
The example is mostly rewritten. It has brand new design. A lot of weird
stuff was rewritten (like a comment talking about randomly generating
nodes when in fact it was just generating ordered numbers 0 to 18 in
simple for; edges being pushed one by one into an array; the String
constructor etc.)

The example now allows layouting method and shaking direction to be
chosen using radio buttons (ordinary buttons were used before) and
checkboxes to choose which nodes should be clustered.
@Thomaash Thomaash requested a review from a team November 26, 2019 22:22
@EquiAvia
Copy link

Very keen for this to be merged in, will solve a number of problems I have been experiencing.

👍

@Thomaash
Copy link
Member Author

Hi @EquiAvia,

are there any other issues this resolves?

@EquiAvia
Copy link

Hi @EquiAvia,

are there any other issues this resolves?

Not from a VisJs perspective, but it resolves a number of user experience challenges I have had with the large extra spaces allocated to the hidden nodes in our app. Thank you for keeping VisJs alive.

@Thomaash
Copy link
Member Author

I'm glad to hear that my work here helps.

@Thomaash Thomaash merged commit 75f4e13 into master Nov 28, 2019
@Thomaash Thomaash deleted the ignore-hidden-nodes branch November 28, 2019 18:15
@vis-bot
Copy link
Collaborator

vis-bot commented Nov 28, 2019

🎉 This PR is included in version 6.4.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Tyler-Maclachlan
Copy link
Contributor

Thanks @Thomaash I will definitly be trying this at work on Monday, but the examples look promising :)

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

Successfully merging this pull request may close these issues.

Hierarchical layout creates massive gaps when there are nodes in clusters
5 participants