Skip to content

Commit fc5c0de

Browse files
authored
use browser.devicePixelRatio instead of directly calling window.devicePixelRatio (#9063)
h/t @pakastin
1 parent 254674e commit fc5c0de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ui/map.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1967,7 +1967,7 @@ class Map extends Camera {
19671967
}
19681968

19691969
_resizeCanvas(width: number, height: number) {
1970-
const pixelRatio = window.devicePixelRatio || 1;
1970+
const pixelRatio = browser.devicePixelRatio || 1;
19711971

19721972
// Request the required canvas size taking the pixelratio into account.
19731973
this._canvas.width = pixelRatio * width;

0 commit comments

Comments
 (0)