MapComplete/src/UI/BigComponents/Summary.svelte

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
1.1 KiB
Svelte
Raw Normal View History

<script lang="ts">
2023-11-23 15:47:16 +01:00
import type { Feature } from "geojson"
import type { SpecialVisualizationState } from "../SpecialVisualization"
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
import TagRenderingAnswer from "../Popup/TagRendering/TagRenderingAnswer.svelte"
2023-12-21 17:36:43 +01:00
import DirectionIndicator from "../Base/DirectionIndicator.svelte"
2023-11-23 15:47:16 +01:00
export let state: SpecialVisualizationState
export let feature: Feature
export let i: number = undefined
let id = feature.properties.id
2023-11-23 15:47:16 +01:00
let tags = state.featureProperties.getStore(id)
let layer: LayerConfig = state.layout.getMatchingLayer(tags.data)
</script>
<span class="inline-flex gap-x-1">
2023-12-30 15:24:30 +01:00
<a
class="small flex w-fit cursor-pointer items-center space-x-0.5"
href={`#${feature.properties.id}`}
>
{#if i !== undefined}
<span class="font-bold">{i + 1} &nbsp;</span>
{/if}
<TagRenderingAnswer
config={layer.title}
extraClasses="inline-flex w-fit"
{layer}
selectedElement={feature}
{state}
{tags}
/>
</a>
<DirectionIndicator {feature} {state} />
</span>