fixes list saving
This commit is contained in:
@@ -197,11 +197,10 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="flex gap-x-4 gap-y-1 text-base flex-wrap">
|
<div class="flex gap-x-4 gap-y-1 text-base flex-wrap">
|
||||||
{#if trail.category}
|
{#if trail.expand?.category?.name || trail.category}
|
||||||
<p>
|
<p>
|
||||||
<i class="fa fa-shapes mr-3"> </i>{$_(trail.category)}
|
<i class="fa fa-shapes mr-3"> </i>{$_(trail.expand?.category?.name ?? trail.category ?? "-")}
|
||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
{#if trail.location}
|
{#if trail.location}
|
||||||
|
|||||||
@@ -152,9 +152,9 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="flex flex-wrap gap-x-8 gap-y-1">
|
<div class="flex flex-wrap gap-x-8 gap-y-1">
|
||||||
{#if trail.category}
|
{#if trail.expand?.category?.name || trail.category}
|
||||||
<p>
|
<p>
|
||||||
<i class="fa fa-shapes mr-3"> </i>{$_(trail.category)}
|
<i class="fa fa-shapes mr-3"> </i>{$_(trail.expand?.category?.name ?? trail.category ?? "-")}
|
||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
{#if trail.location}
|
{#if trail.location}
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ export async function lists_show(id: string, handle?: string, f: (url: RequestIn
|
|||||||
for (const trail of response.expand?.trails ?? []) {
|
for (const trail of response.expand?.trails ?? []) {
|
||||||
const gpxData: string = await fetchGPX(trail, f);
|
const gpxData: string = await fetchGPX(trail, f);
|
||||||
trail.expand.gpx_data = gpxData;
|
trail.expand.gpx_data = gpxData;
|
||||||
trail.category = trail.expand?.category?.name ?? "-";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
list.set(response);
|
list.set(response);
|
||||||
|
|||||||
@@ -88,6 +88,9 @@ export class LayerManager {
|
|||||||
|
|
||||||
|
|
||||||
addLayer(id: string, layer: BaseLayer) {
|
addLayer(id: string, layer: BaseLayer) {
|
||||||
|
if(!layer.spec) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (this.layers[id] && this.map.getLayer(id)) {
|
if (this.layers[id] && this.map.getLayer(id)) {
|
||||||
// update sources and return
|
// update sources and return
|
||||||
for (const [sourceId, s] of Object.entries(layer.spec.sources)) {
|
for (const [sourceId, s] of Object.entries(layer.spec.sources)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user