forked from MapComplete/MapComplete
Chore: linting
This commit is contained in:
parent
4625ad9a5c
commit
097141f944
307 changed files with 5346 additions and 2147 deletions
|
@ -10,24 +10,25 @@
|
|||
* Optional. Only used for the 'global' change indicator so that it won't spin on pan/zoom but only when a change _actually_ occured
|
||||
*/
|
||||
export let rasterLayer: UIEventSource<any> = undefined
|
||||
|
||||
|
||||
let didChange = undefined
|
||||
onDestroy(rasterLayer?.addCallback(() => {
|
||||
didChange = true
|
||||
}) ??( () => {}))
|
||||
|
||||
onDestroy(Stores.Chronic(250).addCallback(
|
||||
() => {
|
||||
onDestroy(
|
||||
rasterLayer?.addCallback(() => {
|
||||
didChange = true
|
||||
}) ?? (() => {})
|
||||
)
|
||||
|
||||
onDestroy(
|
||||
Stores.Chronic(250).addCallback(() => {
|
||||
const mapIsLoading = !map.data?.isStyleLoaded()
|
||||
isLoading = mapIsLoading && (didChange || rasterLayer === undefined)
|
||||
if(didChange && !mapIsLoading){
|
||||
if (didChange && !mapIsLoading) {
|
||||
didChange = false
|
||||
}
|
||||
},
|
||||
))
|
||||
})
|
||||
)
|
||||
</script>
|
||||
|
||||
|
||||
{#if isLoading}
|
||||
<Loading cls="h-6 w-6" />
|
||||
{:else}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue