forked from MapComplete/MapComplete
More svelte work
This commit is contained in:
parent
890980d534
commit
112162e6c8
6 changed files with 75 additions and 31 deletions
|
@ -108,7 +108,10 @@ class SingleLayerSelectionButton extends Toggle {
|
|||
// Is the previous layer still valid? If so, we don't bother to switch
|
||||
if (
|
||||
previousLayer.data.feature === null ||
|
||||
GeoOperations.inside(locationControl.data, previousLayer.data.feature)
|
||||
GeoOperations.inside(
|
||||
[locationControl.data.lon, locationControl.data.lat],
|
||||
previousLayer.data.feature
|
||||
)
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
<!-- A contact link indicates how a mapper can contact their local community -->
|
||||
<script lang="ts">
|
||||
import {Store} from "../../Logic/UIEventSource";
|
||||
|
||||
<!-- The _properties_ of a community feature -->
|
||||
// A contact link indicates how a mapper can contact their local community
|
||||
// The _properties_ of a community feature
|
||||
export let country: Store<{ resources; nameEn: string }>
|
||||
let resources = country.mapD(country => Object.values(country?.resources ?? {}))
|
||||
|
||||
let resources : Store<{ id: string, resolved: Record<string, string> }[]> = country.map(country => {
|
||||
if(country === undefined){
|
||||
return []
|
||||
}
|
||||
return Array.from(Object.values(country?.resources ?? {}))
|
||||
})
|
||||
</script>
|
||||
|
||||
<div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue