-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
centerGraph()
also seems to adjust zoom
#130
Comments
Any chance for a fix soon? Is there a workaround? |
Is there an alternative solution at the moment to fix this? |
Hmmm I'm not able to recreate this issue. @Edouard-Tby can you provide a repo that recreates it? Screen.Recording.2024-05-15.at.11.28.54.AM.mov |
Enregistrement.2024-05-15.215609.mp4@ghsteff, thanks for your answer, to recreate it you have to zoom in or zoom out. As you can see in the screen recording the centerGraph function will reset the zoom. Please let me know if that is not clear. |
Ah I see what you're saying. To me personally, it feels expected that if you're zoomed way in or out that centering the graph adjusts the camera position and fits the zoom nicely onto the node you're centering on. I get how that's preference tho Maybe we can separate the functionality into |
I understand you point but in the case of large graphs, the current approach can sometimes be disorienting for the end user. We could for instance separate the functionalities as you suggest or introduce a boolean parameter, fitZoom, into the centerGraph function to enhance user experience. |
This should be fixed in |
Describe the bug
On my project locally it zooms in slightly, on the demos page is zooms out quite far.
https://reagraph.dev/?path=%2Fstory%2Fdemos-controls--all
Tried multiple browsers, different browser sizes - same.
Steps to Reproduce the Bug or Issue
Expected behavior
Center and not adjust zoom
Screenshots or Videos
The text was updated successfully, but these errors were encountered: