From fc5c0de05d220dd9c8393941161abdfaa737772c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Thu, 5 Dec 2019 12:41:00 +0100 Subject: [PATCH] use browser.devicePixelRatio instead of directly calling window.devicePixelRatio (#9063) h/t @pakastin --- src/ui/map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/map.js b/src/ui/map.js index f4aa7d63cf0..88f63d740e8 100755 --- a/src/ui/map.js +++ b/src/ui/map.js @@ -1967,7 +1967,7 @@ class Map extends Camera { } _resizeCanvas(width: number, height: number) { - const pixelRatio = window.devicePixelRatio || 1; + const pixelRatio = browser.devicePixelRatio || 1; // Request the required canvas size taking the pixelratio into account. this._canvas.width = pixelRatio * width;