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

Canvases rendering error when width is too high #3815

Closed
Cyp-Leg opened this issue Aug 9, 2024 · 1 comment · Fixed by #3819
Closed

Canvases rendering error when width is too high #3815

Cyp-Leg opened this issue Aug 9, 2024 · 1 comment · Fixed by #3819
Labels

Comments

@Cyp-Leg
Copy link

Cyp-Leg commented Aug 9, 2024

Bug description

Same bug as mentionned in this issue :
#3682
When the Wavesurfer container is given a too large width (ie: +80000), only one canvas is rendered with this width instead of multiple canvas of MAX_CANVAS_WIDTHpx, resulting in an error

This bug was fixed in 7.7.12 but seems to be present again in 7.8.2

Environment

  • Browser: Chrome

Minimal code snippet

const options = {
  container: 'body',
  height: 128,
  width: 80000,
  normalize: false,
  waveColor: '#ff4e00',
  progressColor: '#dd5e98',
  cursorColor: '#ddd5e9',
  cursorWidth: 2,
  url: '/examples/audio/audio.wav',
  mediaControls: true,
  sampleRate: 8000,
}

const wavesurfer = WaveSurfer.create(options)

Expected result

Multiple canvas of smaller width
Capture d’écran 2024-08-09 à 16 36 22

Obtained result

Single canvas width huge width, resulting in display error
Capture d’écran 2024-08-09 à 16 38 20

Screenshots

Capture d’écran 2024-08-09 à 16 30 16

@Cyp-Leg Cyp-Leg added the bug label Aug 9, 2024
@katspaugh
Copy link
Owner

Thanks for the report!

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

Successfully merging a pull request may close this issue.

2 participants