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

The dragSelection event did not take effect and could not slide #97

Closed
msfe-copilot2 opened this issue Jun 17, 2024 · 2 comments
Closed
Labels
help wanted Extra attention is needed P_LOW [Maintainers Only Tag] Low Priority

Comments

@msfe-copilot2
Copy link

{
key: "regions",
plugin: RegionsPlugin,
options: { dragSelection: true }
},

@ShiiRochi
Copy link
Owner

Hi, @msfe-copilot2, it's a late response, but what version of wavesrufer.js package you're using?

Currently, according to wavesurfer.hs documentation the "Regions" plugin does not have such field and instead provides you with "drag" option.

Check here: https://wavesurfer.xyz/plugins/regions

@ShiiRochi ShiiRochi added help wanted Extra attention is needed P_LOW [Maintainers Only Tag] Low Priority labels Jul 16, 2024
@ShiiRochi
Copy link
Owner

ShiiRochi commented Jul 20, 2024

According to wavesurfer.js documentation RegionsPlugin provides a method called enableDragSelection.

More info here:
katspaugh/wavesurfer.js#3367

Moreover, I don't want to put something very opinionated into useWavesurfer, i.e. watching for enableDragSelection param in RegionsPlugin (one of several plugins) because RegionsPlugin can be not used in every project, thus it's easier to create CustomRegionsPlugin extending original one to enable dragSelection after plugin is created via super call.

How your case can be resolved?
One of possible ways is to create custom regions plugin on basis of original one and another one is to use useWavesurfer hook in custom component and place it as child of WaveSurfer and enable dragSelection.

@ShiiRochi ShiiRochi closed this as not planned Won't fix, can't repro, duplicate, stale Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed P_LOW [Maintainers Only Tag] Low Priority
Projects
None yet
Development

No branches or pull requests

2 participants