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

Handle minPxPerSec differently to allow for zooming #132

Merged
merged 4 commits into from Mar 12, 2014
Merged

Handle minPxPerSec differently to allow for zooming #132

merged 4 commits into from Mar 12, 2014

Conversation

mwise
Copy link
Contributor

@mwise mwise commented Mar 8, 2014

This PR updates the wavesurfer prototype to assign this.minPxPerSec before using it. This allows you to modify minPxPerSec externally and then drawBuffer, effectively adding a 'zoom' capability. It also adds a 'redraw' event that is triggered when drawBuffer() is called, allowing plugins (timeline, for example) to listen for this event and redraw accordingly.

@mwise mwise mentioned this pull request Mar 8, 2014
@katspaugh
Copy link
Owner

Hi Mark,

Thank you, I'll have a look tonight!

katspaugh added a commit that referenced this pull request Mar 12, 2014
Handle minPxPerSec differently to allow for zooming
@katspaugh katspaugh merged commit 1d8879f into katspaugh:master Mar 12, 2014
@katspaugh
Copy link
Owner

OK!

@pitrackster
Copy link

Hi there,

I'm currently trying to implement zoom-in / out method but facing problems :

  • zoom-in changes the length of the waveform but scroll is not applied dynamically (overflowX: 'auto' does the trick on drawer.createWrapper but I'm not sure it is the good way of doing it)
  • I can handle the redraw event in wavesurfer.timeline.js, but the minPxPerSec does not change so the timeline does not follow the waveform...

Can you please provide an exemple that allow zoom-in and timeline update ?

Thanks a lot !

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

Successfully merging this pull request may close these issues.

3 participants