forked from MapComplete/MapComplete
Studio: add slideshow, add useability tweaks
This commit is contained in:
parent
2df9aa8564
commit
8bc555fbe0
26 changed files with 440 additions and 316 deletions
|
|
@ -0,0 +1,28 @@
|
|||
<script lang="ts">
|
||||
import Marker from "../Map/Marker.svelte";
|
||||
import NextButton from "../Base/NextButton.svelte";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import { AllSharedLayers } from "../../Customizations/AllSharedLayers";
|
||||
|
||||
export let layerIds : { id: string }[]
|
||||
const dispatch = createEventDispatcher<{layerSelected: string}>()
|
||||
|
||||
function fetchIconDescription(layerId): any {
|
||||
return AllSharedLayers.getSharedLayersConfigs().get(layerId)?._layerIcon;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
{#if layerIds.length > 0}
|
||||
<slot name="title"/>
|
||||
<div class="flex flex-wrap">
|
||||
{#each Array.from(layerIds) as layer}
|
||||
<NextButton clss="small" on:click={() => dispatch("layerSelected", layer.id)}>
|
||||
<div class="w-4 h-4 mr-1">
|
||||
<Marker icons={fetchIconDescription(layer.id)} />
|
||||
</div>
|
||||
{layer.id}
|
||||
</NextButton>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
Loading…
Add table
Add a link
Reference in a new issue