From 4a24146a2022f4ca78c52ec25569cc779a7bcf37 Mon Sep 17 00:00:00 2001 From: Juha Lindstedt Date: Fri, 22 Nov 2019 17:21:39 +0200 Subject: [PATCH] use browser.devicePixelRatio instead of directly calling window.devicePixelRatio --- 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;