Refactoring: move method

This commit is contained in:
Pieter Vander Vennet 2025-08-01 17:31:41 +02:00
parent a2ad13dd50
commit b8a0fbe662
15 changed files with 31 additions and 44 deletions

View file

@ -1,13 +1,11 @@
<script lang="ts">/**
* Show a compass. The compass outline rotates with the map, the compass needle points to the actual north
*/
import { UIEventSource } from "../../Logic/UIEventSource"
import { Store, UIEventSource } from "../../Logic/UIEventSource"
import { Orientation } from "../../Sensors/Orientation"
import Compass_back from "../../assets/svg/Compass_back.svelte"
import Compass_needle from "../../assets/svg/Compass_needle.svelte"
import North_arrow from "../../assets/svg/North_arrow.svelte"
import { Store } from "../../Logic/UIEventSource"
import { Translation } from "../i18n/Translation"
export let mapProperties: { rotation: UIEventSource<number>, allowRotating: Store<boolean> }
let orientation = Orientation.singleton.alpha
@ -24,11 +22,6 @@ function clicked(e: Event) {
}
} else {
mapProperties.rotation.set(0)
explanation.set(new Translation({ "*": "North is now up" }))
showPopover = true
Utils.waitFor(5000).then(() => {
showPopover = false
})
}
}