Fix slope input

This commit is contained in:
Pieter Vander Vennet 2023-12-14 18:06:07 +01:00
parent 3327c02217
commit 736ab13ceb

View file

@ -34,12 +34,12 @@
let gamma = new UIEventSource<number>(45) let gamma = new UIEventSource<number>(45)
let abs = new UIEventSource<number>(undefined) let abs = new UIEventSource<number>(undefined)
let gotMeasurement = false let gotMeasurement = new UIEventSource(false)
let arrowDirection: number = undefined let arrowDirection: number = undefined
function handleOrientation(event) { function handleOrientation(event) {
gotMeasurement = true gotMeasurement.setData(true)
// IF the phone is lying flat, then: // IF the phone is lying flat, then:
// alpha is the compass direction (but not absolute) // alpha is the compass direction (but not absolute)
// beta is tilt if you would lift the phone towards you // beta is tilt if you would lift the phone towards you
@ -78,7 +78,7 @@
}, [beta]) }, [beta])
</script> </script>
{#if gotMeasurement} {#if $gotMeasurement}
<div class="flex flex-col m-2"> <div class="flex flex-col m-2">
<div class="flex w-full"> <div class="flex w-full">