Adjust tunnel component to offer mid-tunnel section.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user