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

Incorrect calculation of waveform canvas width if devicePixelRatio != 1 #3771

Closed
baldvic opened this issue Jul 1, 2024 · 3 comments · Fixed by #3774
Closed

Incorrect calculation of waveform canvas width if devicePixelRatio != 1 #3771

baldvic opened this issue Jul 1, 2024 · 3 comments · Fixed by #3774
Labels

Comments

@baldvic
Copy link

baldvic commented Jul 1, 2024

Bug description

Waveform canvas width calculated incorrectly if devicePixelRatio != 1, i.e. changing browser window zoom.
Origination of bug is that devicePixelRatio is applied twice.

Environment

  • Browser: Chrome

Expected result

image

Obtained result

image

Root cause

image

render() -> renderChannel() -> renderMultiCanvas() -> renderSingleCanvas()

image

As result, if devicePixelRatio less than 1 it reduces final canvas width and makes it smaller than wrapper div

@baldvic baldvic added the bug label Jul 1, 2024
@katspaugh
Copy link
Owner

Good catch!

@katspaugh
Copy link
Owner

Should be fixed in 7.8.1. Thank you!

@baldvic
Copy link
Author

baldvic commented Jul 4, 2024

Confirmed. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants