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

Can't seek if insert-segment is enabled #539

Open
jason30704 opened this issue Aug 19, 2024 · 9 comments
Open

Can't seek if insert-segment is enabled #539

jason30704 opened this issue Aug 19, 2024 · 9 comments

Comments

@jason30704
Copy link

jason30704 commented Aug 19, 2024

Hello,
WaveformDragMode currently only has 'scroll' and 'insert-segment'. But this will make zoomview unable to seek. Is it possible for ZoomView to retain the ability to seek even when scrolling is disabled?

Such as providing "insert-point" and "seek-without-scroll" mode.

@jason30704 jason30704 changed the title WaveformDragMode seek Can't seek if insert-segment is enabled Aug 19, 2024
@chrisn
Copy link
Member

chrisn commented Aug 19, 2024

Currently, to seek in the zoomview you can either click in the waveform or drag the playhead, so this should still work if scrolling is disabled. Insert segment mode does prevent seek, I think it might be confusing if seek is also allowed.

@jason30704
Copy link
Author

But if I want to prevent zoomview scroll now, can't I only set Insert segment mode?
This means that if you want zoomview to be unable to scroll, it will only be in Insert segment mode. Therefore, it will not be able to seek.
Or maybe I misunderstood some part.
thank you.

@chrisn
Copy link
Member

chrisn commented Aug 19, 2024

Sorry, I think that's right, there currently isn't a way to only disable scrolling.

@chrisn
Copy link
Member

chrisn commented Aug 19, 2024

I'm not sure I understand what you want to be able to do. Do you want an option to disable scrolling, but also not insert segments?

@jason30704
Copy link
Author

Yes, I hope that zoomview can disable scrolling and still retain the ability to seek when clicking.
But currently using insert-segments, I will not be able to seek by clicking.

@chrisn
Copy link
Member

chrisn commented Aug 20, 2024

Thanks, so we could add an option and method to enable and disable scrolling. But we'll need to think about how this would interact with the existing autoScroll option and enableAutoScroll(boolean, options) method.

@jason30704
Copy link
Author

Intuitively, I feel that if scrolling is disabled, autoScroll should also be disabled. Unless you go through the settings again. Is there any conflict between these two settings so that you need to consider specifically?

@chrisn
Copy link
Member

chrisn commented Aug 21, 2024

I agree, disabling scroll would also disable auto-scroll. I'm thinking about the API we might provide. The simplest is to add a new enableScroll(boolean) method, and no config option, so the default is scroll enabled.

I thought about combining the auto-scroll controls into a single enableScroll(boolean, options) but this is probably more confusing:

view.enableScroll(false); // Disables all scrolling
view.enableScroll(true); // Enables scroll and auto-scroll
view.enableScroll(true, { auto: false }); // Enables scroll but not auto-scroll
                                          // same as existing view.enableAutoScroll(false)
view.enableScroll(true, { offset: pixels }); // Enables scroll and auto-scroll, sets auto-scroll offset

@jason30704
Copy link
Author

jason30704 commented Aug 22, 2024

Based on my current experience, I agree that separate settings may be more suitable for current project usage.
Also, I think add 'insert-point' to WaveformDragMode is a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants