-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat add ZoomPlugin #3276
feat add ZoomPlugin #3276
Conversation
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.
A nice plugin with a clear purpose! ❤️
I need to do anything else? This is my first PR. |
Yes, I'd like the comments I left addressed. |
The code looks good! |
nice, I will add one tomorrow. |
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.
Awesome, thank you!
@katspaugh would be nice to have that example on the website. |
Feel free to add it |
I meant on wavesurfer.xyz/examples/. And if possible, I haven't found a way to do it. |
They are sourced from https://github.com/katspaugh/wavesurfer.js/tree/main/examples Edit: |
Short description
Add zoom plugin ,which implements waveform zoom operation via mouse wheel.
Implementation details
By calculating the scaled ratio and scroll position based on the audio time at the mouse's location, the current zoom level, and the width of the div container, we can then adjust the zoom level of wavesurfer and control scrolling
How to test it
Screenshots
Checklist