Adjust tunnel component to offer mid-tunnel section.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
import BaseTrack from './BaseTrack.svelte';
|
import BaseTrack from './BaseTrack.svelte';
|
||||||
|
|
||||||
export let feature: {
|
export let feature: {
|
||||||
tunnelType: 'start' | 'whole' | 'end';
|
tunnelType: 'start' | 'whole' | 'end' | 'mid';
|
||||||
length: string;
|
length: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
const portalColour = '#475569'; // Slate grey
|
const portalColour = '#475569'; // Slate grey
|
||||||
|
|
||||||
$: effectiveType = (() => {
|
$: 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';
|
return feature.tunnelType === 'start' ? 'end' : 'start';
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</g>
|
</g>
|
||||||
|
|
||||||
{#if feature.tunnelType === 'whole' && feature.length}
|
{#if feature.length}
|
||||||
<rect x="12" y="26" width="40" height="12" fill="white" />
|
<rect x="12" y="26" width="40" height="12" fill="white" />
|
||||||
<text
|
<text
|
||||||
x="32"
|
x="32"
|
||||||
|
|||||||
Reference in New Issue
Block a user