Run npm format
This commit is contained in:
@@ -1,39 +1,36 @@
|
||||
<script lang="ts">
|
||||
import {getElecColour} from '$lib/railStyles';
|
||||
import BaseTrack from '$lib/components/mapIcons/BaseTrack.svelte';
|
||||
import { getElecColour } from '$lib/railStyles';
|
||||
import BaseTrack from '$lib/components/mapIcons/BaseTrack.svelte';
|
||||
|
||||
export let feature: {
|
||||
direction: 'up' | 'down';
|
||||
diverges: 'left' | 'right';
|
||||
elecBranch?: string;
|
||||
};
|
||||
export let activeElec: any;
|
||||
export let reversed: boolean = false;
|
||||
export let feature: {
|
||||
direction: 'up' | 'down';
|
||||
diverges: 'left' | 'right';
|
||||
elecBranch?: string;
|
||||
};
|
||||
export let activeElec: any;
|
||||
export let reversed: boolean = false;
|
||||
|
||||
$: isUp = feature.direction === 'up';
|
||||
$: visualUp = reversed ? !isUp : isUp;
|
||||
|
||||
$: isRight = feature.diverges === 'right';
|
||||
$: isUp = feature.direction === 'up';
|
||||
$: visualUp = reversed ? !isUp : isUp;
|
||||
|
||||
$: yStart = visualUp ? 64 : 0;
|
||||
$: yEnd = visualUp ? 8 : 56;
|
||||
$: xEnd = isRight ? 56 : 8;
|
||||
$: isRight = feature.diverges === 'right';
|
||||
|
||||
$: branchColour = getElecColour(feature.elecBranch || activeElec);
|
||||
$: branchPath = `M 32 ${yStart} Q 32 32 ${xEnd} ${yEnd}`;
|
||||
$: yStart = visualUp ? 64 : 0;
|
||||
$: yEnd = visualUp ? 8 : 56;
|
||||
$: xEnd = isRight ? 56 : 8;
|
||||
|
||||
$: branchColour = getElecColour(feature.elecBranch || activeElec);
|
||||
$: branchPath = `M 32 ${yStart} Q 32 32 ${xEnd} ${yEnd}`;
|
||||
</script>
|
||||
|
||||
<svg viewBox="0 0 64 64" width="64" height="64" class="junction">
|
||||
<path
|
||||
d={branchPath}
|
||||
fill="none"
|
||||
stroke={branchColour}
|
||||
stroke-width="5"
|
||||
strone-linecap="round"
|
||||
/>
|
||||
<BaseTrack {activeElec} height={64} />
|
||||
<path d={branchPath} fill="none" stroke={branchColour} stroke-width="5" strone-linecap="round" />
|
||||
<BaseTrack {activeElec} height={64} />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
svg { display: block; overflow: visible; }
|
||||
</style>
|
||||
svg {
|
||||
display: block;
|
||||
overflow: visible;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user