diff --git a/package.json b/package.json index 6d9ecc03ee..df2a6a44ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapcomplete", - "version": "0.36.4", + "version": "0.36.5", "repository": "https://github.com/pietervdvn/MapComplete", "description": "A small website to edit OSM easily", "bugs": "https://github.com/pietervdvn/MapComplete/issues", diff --git a/src/UI/InputElement/Helpers/SlopeInput.svelte b/src/UI/InputElement/Helpers/SlopeInput.svelte index 162f88ca7a..449b913959 100644 --- a/src/UI/InputElement/Helpers/SlopeInput.svelte +++ b/src/UI/InputElement/Helpers/SlopeInput.svelte @@ -39,6 +39,7 @@ function handleOrientation(event) { + console.debug("Got gyro measurement") gotMeasurement.setData(true) // IF the phone is lying flat, then: // alpha is the compass direction (but not absolute) @@ -56,7 +57,12 @@ } } - window.addEventListener("deviceorientation", handleOrientation) + console.log("Starting device orientation listener") + try { + window.addEventListener("deviceorientation", e => handleOrientation(e)) + } catch (e) { + console.log("Could not init device orientation api due to", e) + } beta.map(beta => { if (-safetyMargin < arrowDirection && arrowDirection < safetyMargin) {