Zoom resets after label visibility changes
Closed this issue · 1 comments
Describe the bug
For large graphs labels are sometimes hidden and when zooming in they start to appear. That triggers redraw and zoom resets. Labels get hidden again resulting in a looping zoom behavior. Unless you zoom in fast enough you can't get past the point of resetting back to whole graph fitting the screen.
Maybe there is another reason underlying large graphs zooming in, - labels changing visibility is the one i noticed,
Steps to Reproduce the Bug or Issue
- Goto https://reagraph.dev/?path=/story/demos-use-cases--mitre-all-techniques
- Start zoomed out and slowly zoom in. View will reset as soon as labels start to appear
Expected behavior
Smooth zoom in / zoom out
Screenshots or Videos
No response
Platform
- Reagraph Version: 4.15.26
- Windows
- Browser: Chrome
Your Example Website or App
No response
Additional context
No response
I encountered a similar issue when zooming in, hovering over a node to highlight it and then the zoom/pan will get reset.
A very similar thing is happening as well when zooming and panning without hovering anything. Then, the view gets centered without resetting the zoom (can be related to the labels as you mentioned).