Skip to content

Commit

Permalink
use browser.devicePixelRatio instead of directly calling window.devic…
Browse files Browse the repository at this point in the history
…ePixelRatio (#9063)

h/t @pakastin
  • Loading branch information
kkaefer authored Dec 5, 2019
1 parent 254674e commit fc5c0de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fc5c0de

Please sign in to comment.