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

Changing position of root node after re-render tree #93

Open
phollaki opened this issue Aug 19, 2021 · 1 comment
Open

Changing position of root node after re-render tree #93

phollaki opened this issue Aug 19, 2021 · 1 comment

Comments

@phollaki
Copy link

phollaki commented Aug 19, 2021

Hi Pierre! I am using Treeviz tree diagram with React. I am changing isHorizontal props of tree dinamically, whenever tree data is too long i switch to display it vertically and when my dataset is small I display it horizontally. I want to do that if i click one of the tree nodes it changes the dataset re-render my tree. It successfully changes from horizontal to vertical and vica versa but my root will stay in the same position. How could i centralize my tree whenever it re-renders.

@PierreCapo
Copy link
Owner

Hello, probably not supported right now except if you manually "hack" the elements in the page.
I'll look into making an update this week to tackle your problem although I can not promise anything in terms of timing

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

No branches or pull requests

2 participants