diff --git a/website/src/lib/components/layer-control/LayerControl.svelte b/website/src/lib/components/layer-control/LayerControl.svelte index 57e977ff..dbc22a9c 100644 --- a/website/src/lib/components/layer-control/LayerControl.svelte +++ b/website/src/lib/components/layer-control/LayerControl.svelte @@ -1,219 +1,231 @@ - - { - if (!open) { - cancelEvents = true; - openLayerControl(); - setTimeout(() => { - cancelEvents = false; - }, 500); - } - }} - > - - - - - - - - - - - - {#if $currentOverlays} - - {/if} - - - - {#if $currentOverpassQueries} - - {/if} - - - - - + + { + if (!open) { + cancelEvents = true; + openLayerControl(); + setTimeout(() => { + cancelEvents = false; + }, 500); + } + }} + > + + + + + + + + + + + + {#if $currentOverlays} + + {/if} + + + + {#if $currentOverpassQueries} + + {/if} + + + + + { - if (open && !cancelEvents && !container.contains(e.target)) { - closeLayerControl(); - } - }} + on:click={(e) => { + if (open && !cancelEvents && !container.contains(e.target)) { + closeLayerControl(); + } + }} />