Remove different minzoom requirements for retina display, should not be applicable anymore as we don't use leaflet anymore
All checks were successful
/ deploy_on_hosted (push) Successful in 16m33s

This commit is contained in:
Pieter Vander Vennet 2025-06-15 11:52:38 +02:00
parent 605ffc0ccf
commit 9324f58460

View file

@ -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<string>(Constants.priviliged_layers)
public static isPriviliged(layer: string | { id: string }) {