forked from MapComplete/MapComplete
Merge master
This commit is contained in:
commit
cc65936369
80 changed files with 3232 additions and 971 deletions
|
@ -1,8 +1,8 @@
|
|||
import { Utils } from "../Utils";
|
||||
|
||||
export default class Constants {
|
||||
public static vNumber = "0.3.0" +
|
||||
"a";
|
||||
|
||||
public static vNumber = "0.4.7";
|
||||
|
||||
// The user journey states thresholds when a new feature gets unlocked
|
||||
public static userJourney = {
|
||||
|
@ -15,7 +15,16 @@ export default class Constants {
|
|||
themeGeneratorReadOnlyUnlock: 200,
|
||||
themeGeneratorFullUnlock: 500,
|
||||
addNewPointWithUnreadMessagesUnlock: 500,
|
||||
minZoomLevelToAddNewPoints: (Utils.isRetina() ? 18 : 19)
|
||||
minZoomLevelToAddNewPoints: (Constants.isRetina() ? 18 : 19)
|
||||
};
|
||||
|
||||
private static isRetina(): boolean {
|
||||
if (Utils.runningFromConsole) {
|
||||
return;
|
||||
}
|
||||
// The cause for this line of code: https://github.com/pietervdvn/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));
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue