-
Notifications
You must be signed in to change notification settings - Fork 36
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(ui): zoom in and out from cursor position #262
fix(ui): zoom in and out from cursor position #262
Conversation
DEV-1223 [FEATURE] Flow Editor Zoom Scroll
Is your feature request related to a problem? Please describe. Also, the current mouse scroll-in implementation isn't super friendly. Describe the solution you'd like
Describe alternatives you've considered
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Really good cleanup! 💪
I have found a single small issue, but otherwise, it looks fine to me
simplescreenrecorder-2022-02-02_19.09.40.mp4
…v-1223-feature-flow-editor-zoom-scroll
…github.com:botpress/studio into robgordon-dev-1223-feature-flow-editor-zoom-scroll
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and working perfectly! Awesome work as usual!
* fix(ui): zoom in and out from cursor position (#262) * fix(ui): zoom in and out from cursor position * fix(ui): zoom to fit Co-authored-by: Samuel Massé <samuelmasse4@gmail.com> Co-authored-by: Laurent Leclerc-Poulin <laurentleclercpoulin@gmail.com> * chore(formatting): run prettier Co-authored-by: Samuel Massé <samuelmasse4@gmail.com> Co-authored-by: Laurent Leclerc-Poulin <laurentleclercpoulin@gmail.com>
This fixes the odd zooming behavior in the studio
react-storm-diagram had some errors in how it processed non-integer zoom levels
To create a smooth zoom we
wheel
handler that manages zooming in and outI changed the minimum zoom to 25 rather than 10 because 10 seemed comically small and 25 was the smallest value in out
select
in the interface. I also set a reasonable maximum (again, from the select). Happy to change or remove this functionality if people see fit.Before
Screen.Recording.2022-02-02.at.3.28.19.PM.mov
After
Screen.Recording.2022-02-02.at.2.54.10.PM.mov