2023-10-11 04:16:52 +02:00
|
|
|
<script lang="ts">
|
2023-11-19 04:38:34 +01:00
|
|
|
import { IconConfig } from "../../Models/ThemeConfig/PointRenderingConfig";
|
|
|
|
import { ImmutableStore, Store } from "../../Logic/UIEventSource";
|
|
|
|
import DynamicIcon from "./DynamicIcon.svelte";
|
|
|
|
import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig";
|
2023-10-11 04:16:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Renders a 'marker', which consists of multiple 'icons'
|
|
|
|
*/
|
2023-11-19 04:38:34 +01:00
|
|
|
export let marker: IconConfig[] = config?.marker;
|
|
|
|
export let tags: Store<Record<string, string>>;
|
2023-11-27 16:05:41 +01:00
|
|
|
export let rotation: TagRenderingConfig
|
2023-11-19 04:38:34 +01:00
|
|
|
let _rotation = rotation ? tags.map(tags => rotation.GetRenderValue(tags).Subs(tags).txt) : new ImmutableStore(0);
|
2023-11-27 16:05:41 +01:00
|
|
|
|
2023-10-11 04:16:52 +02:00
|
|
|
</script>
|
2023-11-09 16:30:26 +01:00
|
|
|
|
2023-11-19 04:38:34 +01:00
|
|
|
{#if marker && marker}
|
|
|
|
<div class="relative h-full w-full" style={`transform: rotate(${$_rotation})`}>
|
|
|
|
{#each marker as icon}
|
2023-10-11 04:16:52 +02:00
|
|
|
<DynamicIcon {icon} {tags} />
|
|
|
|
{/each}
|
|
|
|
</div>
|
|
|
|
{/if}
|