Stretched rendering on high PPI (canvas only, LibreWolf)
What i did / Steps to reproduce
- Install LibreWolf on Linux
- Disable fingerprinting for the specific BlueMap instance
- make sure screen width is > 2048?
- Load the map
- Rendering is stretched.
Expected result
- Map should not be stretched, and occupy entire viewport width (below is a version that I fixed by inspecting html)
Actual result
- Map is stretched (compressed to the left), right part of the screen has a black bar (below is what I get on page load)
Context
- BlueMap version 5.15 on fabric 1.21.11
BlueMap appears to be streched on high PPI screens on non chromium browsers? my screen dimensions are 2565x1148.
Inspecting the html, I see that the canvas width and height are at 5130x2316. Which appears to be correct.
<canvas style="display: block; width: 2565px; height: 1158px; touch-action: none; user-select: none;" data-engine="three.js r147" width="5130" height="2316"></canvas>
the stretching can be fixed by manually setting canvas width to 4096 like so:
<canvas style="display: block; width: 2565px; height: 1158px; touch-action: none; user-select: none;" data-engine="three.js r147" width="4096" height="2316"></canvas>
obviously this is a bandage fix, and I was not a able to make a working tampermonkey script to fix this.
I also noticed that by using "Responsive Design Mode" in LibreWolf devtools and changing the screen width that the stretching (again, compressing to the left in my case) only occurs on my screen at widths greater than 2048.
Can replicate on librewolf, also vertically. Does not happen on firefox. But does happens on three.js demos so probably not BlueMap's fault.
Okay, no worries then.