chore: show true distance in info bar

This commit is contained in:
uku 2024-10-23 12:37:11 +02:00
parent 4ec67305e1
commit 66d32683fc
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o

View file

@ -24,8 +24,8 @@
});
let latlng = $state(L.latLng(0, 0));
let distance = $derived(Math.max(0, latlng.distanceTo(point) - 20));
let points = $derived(5000 * Math.exp(-distance / 750));
let distance = $derived(latlng.distanceTo(point));
let points = $derived(5000 * Math.exp(-Math.max(0, distance - 20) / 750));
let lines = $state(true);
let labels = $state(false);