diff --git a/src/Models/Constants.ts b/src/Models/Constants.ts index 43b87ba60e..e1c38552aa 100644 --- a/src/Models/Constants.ts +++ b/src/Models/Constants.ts @@ -72,7 +72,7 @@ export default class Constants { importHelperUnlock: 5000, } - static readonly minZoomLevelToAddNewPoint = Constants.isRetina() ? 17 : 18 + static readonly minZoomLevelToAddNewPoint = 18 /** * Used by 'PendingChangesUploader', which waits this amount of seconds to upload changes. * (Note that pendingChanges might upload sooner if the popup is closed or similar) @@ -227,24 +227,6 @@ export default class Constants { ...Constants.defaultOverpassUrls, ] - private static isRetina(): boolean { - if (Utils.runningFromConsole) { - return false - } - // The cause for this line of code: https://source.mapcomplete.org/MapComplete/MapComplete/issues/115 - // See https://stackoverflow.com/questions/19689715/what-is-the-best-way-to-detect-retina-support-on-a-device-using-javascript - return ( - (window.matchMedia && - (window.matchMedia( - "only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx), only screen and (min-resolution: 75.6dpcm)" - ).matches || - window.matchMedia( - "only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min--moz-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2)" - ).matches)) || - (window.devicePixelRatio && window.devicePixelRatio >= 2) - ) - } - private static priviligedLayerSet = new Set(Constants.priviliged_layers) public static isPriviliged(layer: string | { id: string }) {