Adjust tunnel component to offer mid-tunnel section.

This commit is contained in:
2026-02-13 22:30:48 +00:00
parent 3f1ad2cf39
commit 1393f458db

View File

@@ -2,7 +2,7 @@
import BaseTrack from './BaseTrack.svelte';
export let feature: {
tunnelType: 'start' | 'whole' | 'end';
tunnelType: 'start' | 'whole' | 'end' | 'mid';
length: string;
};
@@ -13,7 +13,7 @@
const portalColour = '#475569'; // Slate grey
$: effectiveType = (() => {
if (!reversed || feature.tunnelType === 'whole') return feature.tunnelType;
if (!reversed || feature.tunnelType === 'whole' || feature.tunnelType === 'mid') return feature.tunnelType;
return feature.tunnelType === 'start' ? 'end' : 'start';
})();
</script>
@@ -32,7 +32,7 @@
{/if}
</g>
{#if feature.tunnelType === 'whole' && feature.length}
{#if feature.length}
<rect x="12" y="26" width="40" height="12" fill="white" />
<text
x="32"