| 
									
										
										
										
											2023-10-11 04:16:52 +02:00
										 |  |  | <script lang="ts"> | 
					
						
							| 
									
										
										
										
											2023-12-19 22:08:00 +01:00
										 |  |  |   import { IconConfig } from "../../Models/ThemeConfig/PointRenderingConfig" | 
					
						
							|  |  |  |   import { Store } from "../../Logic/UIEventSource" | 
					
						
							|  |  |  |   import Icon from "./Icon.svelte" | 
					
						
							| 
									
										
										
										
											2024-06-20 02:22:54 +02:00
										 |  |  |   import { Utils } from "../../Utils" | 
					
						
							| 
									
										
										
										
											2023-10-11 04:16:52 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * Renders a single icon. | 
					
						
							|  |  |  |    * | 
					
						
							|  |  |  |    * Icons -placed on top of each other- form a 'Marker' together | 
					
						
							|  |  |  |    */ | 
					
						
							| 
									
										
										
										
											2023-11-09 16:30:26 +01:00
										 |  |  |   export let icon: IconConfig | 
					
						
							|  |  |  |   export let tags: Store<Record<string, string>> | 
					
						
							| 
									
										
										
										
											2024-06-20 02:22:54 +02:00
										 |  |  |   /** | 
					
						
							|  |  |  |    * Only used in case of emoji | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   export let emojiHeight: number = 40 | 
					
						
							| 
									
										
										
										
											2023-10-11 04:16:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-11 11:33:29 +01:00
										 |  |  |   let iconItem = icon.icon?.GetRenderValue($tags)?.Subs($tags)?.txt | 
					
						
							|  |  |  |   $: iconItem = icon.icon?.GetRenderValue($tags)?.Subs($tags)?.txt | 
					
						
							| 
									
										
										
										
											2024-01-12 23:19:31 +01:00
										 |  |  |   let color = icon.color?.GetRenderValue($tags)?.txt ?? "#000000" | 
					
						
							| 
									
										
										
										
											2023-11-09 16:30:26 +01:00
										 |  |  |   $: color = icon.color?.GetRenderValue($tags)?.txt ?? "#000000" | 
					
						
							| 
									
										
										
										
											2023-10-11 04:16:52 +02:00
										 |  |  | </script> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-06-20 02:22:54 +02:00
										 |  |  | {#if iconItem?.startsWith("<")} | 
					
						
							|  |  |  |   {@html iconItem} | 
					
						
							| 
									
										
										
										
											2024-07-10 11:42:26 +02:00
										 |  |  | {:else if color === "white"} | 
					
						
							|  |  |  |   <span class="light-icon"> | 
					
						
							|  |  |  |     <Icon icon={iconItem} {color} {emojiHeight} /> | 
					
						
							|  |  |  |   </span> | 
					
						
							| 
									
										
										
										
											2024-06-20 02:22:54 +02:00
										 |  |  | {:else} | 
					
						
							|  |  |  |   <Icon icon={iconItem} {color} {emojiHeight} /> | 
					
						
							|  |  |  | {/if} |