MapComplete/src/UI/BigComponents/Summary.svelte

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

29 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"
import ThemeViewState from "../../Models/ThemeViewState"
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">
<a class="small flex space-x-0.5 cursor-pointer w-fit items-center" href={`#${feature.properties.id}`}>
2023-12-21 17:36:43 +01:00
{#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>