Skip to content

Hover plugin conflicts with Zoom, causing blank waveform #3767

@bernardwiesner

Description

@bernardwiesner

Bug description

When using both the Hover plugin together with the zoom, under certain hover and zoom combinations the whole waveform becomes blank, or the width of the waveform is incorrect.

Environment

  • Browser: Chrome

Minimal code snippet

const wavesurfer = WaveSurfer.create({
  container: document.body,
  waveColor: 'rgb(200, 0, 200)',
  progressColor: 'rgb(100, 0, 100)',
  url: '/examples/audio/audio.wav',
  minPxPerSec: 100,
  dragToSeek: true,
  plugins: [
  Hover.create({
    lineColor: '#ff0000',
    lineWidth: 2,
    labelBackground: '#555',
    labelColor: '#fff',
    labelSize: '11px',
  }),
],
})

Expected result

When zooming and using the hover it should work without issues.

Obtained result

Waveform becomes blank and unusable when using both hover and zoom with certain combinations.

Screenshots

hover.zoom.bug.webm

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions