Create route icons and components to place these icons.

This commit is contained in:
2026-02-05 01:52:18 +00:00
parent d38afeb922
commit e977d01315
15 changed files with 683 additions and 86 deletions

View File

@@ -0,0 +1,32 @@
<script lang="ts">
import { getElecColour } from '$lib/railStyles';
import BaseTrack from '$lib/components/mapIcons/BaseTrack.svelte';
export let feature: {
side: 'left' | 'right' | 'both';
elecLoop?: string;
};
export let reversed: boolean = false;
export let activeElec: any;
$: loopColour = getElecColour(feature.elecLoop || activeElec);
const leftPath = `M 32 0 Q 8 32 32 64`;
const rightPath = `M 32 0 Q 56 32 32 64`;
</script>
<svg viewBox="0 0 64 64" width="64" height="64" class="loops">
<g fill="none" stroke={loopColour} stroke-width="4" stroke-linecap="round">
{#if feature.side === 'left' || feature.side === 'both'}
<path d={leftPath} />
{/if}
{#if feature.side === 'right' || feature.side === 'both'}
<path d={rightPath} />
{/if}
</g>
<BaseTrack {activeElec} height={64} />
</svg>