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

Invalid zoom transform after selecting node #467

Open
deiwo opened this issue Sep 13, 2024 · 0 comments
Open

Invalid zoom transform after selecting node #467

deiwo opened this issue Sep 13, 2024 · 0 comments

Comments

@deiwo
Copy link

deiwo commented Sep 13, 2024

PROBLEM:
When both zoom and selectable properties are enabled for TreeRenderer (in my case I also have is-radial: true) when the tree is panned/zoomed and then some branch is selected by clicking on it, the view resets to initial position and when panned again it jumps back to its original zoomed/panned position.

EXPECTED:
The zoom/pan is not changed after selecting a branch by clicking.

POSSIBLE CAUSE:
I suspect this is caused by the fact that the zoom transformation is only applied when zoom event is triggered, but the transform property of the tree-container is changed separately in resizeSvg(tree, svg, tr) function inside events.js. So every time the update() function is called and no resize event was triggered the zoom/panning gets reset.

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

1 participant