From 002e82c4b13550a544c860544c187daec83b5d54 Mon Sep 17 00:00:00 2001 From: Alexander Roidl Date: Tue, 22 Nov 2022 16:20:37 +0100 Subject: [PATCH] dir --- app/templates/home.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/home.html b/app/templates/home.html index e80a739..fa5d0ea 100755 --- a/app/templates/home.html +++ b/app/templates/home.html @@ -74,7 +74,6 @@ zoomSnap: 0.5, animate: true, maxZoom: 19, - minZoom: 10 //dragging: false, //scrollWheelZoom: false, }).setView([48.505, 1.09], zoom_level); @@ -355,6 +354,7 @@ DeviceOrientationEvent.requestPermission() .then((response) => { if (response === "granted") { + alert("granted") window.addEventListener("deviceorientation", handler, true); } else { alert("has to be allowed!"); @@ -366,7 +366,7 @@ function handler(e) { compass = e.webkitCompassHeading || Math.abs(e.alpha - 360); - compassCircle.style.transform = `translate(-50%, -50%) rotate(${pointDegree-compass}deg)`; + compassCircle.style.transform = `translate(-50%, -50%) rotate(${-compass}deg)`; // ±15 degree