Round pixelratio to two decimals (#3147)

This commit is contained in:
Winston Chang
2020-11-16 10:06:38 -06:00
committed by GitHub
parent b421f6bd7f
commit dc6335ed4d
5 changed files with 5 additions and 5 deletions

View File

@@ -162,7 +162,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
function pixelRatio() {
if (window.devicePixelRatio) {
return window.devicePixelRatio;
return Math.round(window.devicePixelRatio * 100) / 100;
} else {
return 1;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -149,7 +149,7 @@ function makeBlob(parts) {
function pixelRatio() {
if (window.devicePixelRatio) {
return window.devicePixelRatio;
return Math.round(window.devicePixelRatio * 100) / 100;
} else {
return 1;
}