mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-08-31 23:53:25 +00:00
fix custom layers spacing
This commit is contained in:
@@ -283,54 +283,58 @@
|
|||||||
$: selectedLayerId, setDataFromSelectedLayer();
|
$: selectedLayerId, setDataFromSelectedLayer();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex flex-col gap-3">
|
<div class="flex flex-col">
|
||||||
<div class="flex flex-col gap-2">
|
{#if $customBasemapOrder.length > 0}
|
||||||
{#if $customBasemapOrder.length > 0}
|
<div class="flex flex-row items-center gap-1 font-semibold mb-2">
|
||||||
<div class="flex flex-row items-center gap-1 font-semibold">
|
<Map size="16" />
|
||||||
<Map size="16" />
|
{$_('layers.label.basemaps')}
|
||||||
{$_('layers.label.basemaps')}
|
<div class="grow">
|
||||||
<div class="grow">
|
<Separator />
|
||||||
<Separator />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
|
||||||
<div bind:this={basemapContainer} class="ml-1.5 flex flex-col gap-1">
|
|
||||||
{#each $customBasemapOrder as id (id)}
|
|
||||||
<div class="flex flex-row items-center gap-2" data-id={id}>
|
|
||||||
<Move size="12" />
|
|
||||||
<span class="grow">{$customLayers[id].name}</span>
|
|
||||||
<Button variant="outline" on:click={() => (selectedLayerId = id)} class="p-1 h-7">
|
|
||||||
<Pencil size="16" />
|
|
||||||
</Button>
|
|
||||||
<Button variant="outline" on:click={() => deleteLayer(id)} class="p-1 h-7">
|
|
||||||
<Trash2 size="16" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
{/each}
|
|
||||||
</div>
|
</div>
|
||||||
{#if $customOverlayOrder.length > 0}
|
{/if}
|
||||||
<div class="flex flex-row items-center gap-1 font-semibold">
|
<div
|
||||||
<Layers2 size="16" />
|
bind:this={basemapContainer}
|
||||||
{$_('layers.label.overlays')}
|
class="ml-1.5 flex flex-col gap-1 {$customBasemapOrder.length > 0 ? 'mb-2' : ''}"
|
||||||
<div class="grow">
|
>
|
||||||
<Separator />
|
{#each $customBasemapOrder as id (id)}
|
||||||
</div>
|
<div class="flex flex-row items-center gap-2" data-id={id}>
|
||||||
|
<Move size="12" />
|
||||||
|
<span class="grow">{$customLayers[id].name}</span>
|
||||||
|
<Button variant="outline" on:click={() => (selectedLayerId = id)} class="p-1 h-7">
|
||||||
|
<Pencil size="16" />
|
||||||
|
</Button>
|
||||||
|
<Button variant="outline" on:click={() => deleteLayer(id)} class="p-1 h-7">
|
||||||
|
<Trash2 size="16" />
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
|
{#if $customOverlayOrder.length > 0}
|
||||||
|
<div class="flex flex-row items-center gap-1 font-semibold mb-2">
|
||||||
|
<Layers2 size="16" />
|
||||||
|
{$_('layers.label.overlays')}
|
||||||
|
<div class="grow">
|
||||||
|
<Separator />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
|
||||||
<div bind:this={overlayContainer} class="ml-1.5 flex flex-col gap-1">
|
|
||||||
{#each $customOverlayOrder as id (id)}
|
|
||||||
<div class="flex flex-row items-center gap-2" data-id={id}>
|
|
||||||
<Move size="12" />
|
|
||||||
<span class="grow">{$customLayers[id].name}</span>
|
|
||||||
<Button variant="outline" on:click={() => (selectedLayerId = id)} class="p-1 h-7">
|
|
||||||
<Pencil size="16" />
|
|
||||||
</Button>
|
|
||||||
<Button variant="outline" on:click={() => deleteLayer(id)} class="p-1 h-7">
|
|
||||||
<Trash2 size="16" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
{/each}
|
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
|
<div
|
||||||
|
bind:this={overlayContainer}
|
||||||
|
class="ml-1.5 flex flex-col gap-1 {$customOverlayOrder.length > 0 ? 'mb-2' : ''}"
|
||||||
|
>
|
||||||
|
{#each $customOverlayOrder as id (id)}
|
||||||
|
<div class="flex flex-row items-center gap-2" data-id={id}>
|
||||||
|
<Move size="12" />
|
||||||
|
<span class="grow">{$customLayers[id].name}</span>
|
||||||
|
<Button variant="outline" on:click={() => (selectedLayerId = id)} class="p-1 h-7">
|
||||||
|
<Pencil size="16" />
|
||||||
|
</Button>
|
||||||
|
<Button variant="outline" on:click={() => deleteLayer(id)} class="p-1 h-7">
|
||||||
|
<Trash2 size="16" />
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Card.Root>
|
<Card.Root>
|
||||||
|
Reference in New Issue
Block a user