Fix linter warnings
This commit is contained in:
@@ -4,7 +4,15 @@
|
||||
|
||||
export let feature: {
|
||||
position: 'over' | 'under';
|
||||
category: 'rail' |'stream'| 'foot' | 'aroad' | 'minorRoad' | 'motorway' | 'waterway' | 'pipeline';
|
||||
category:
|
||||
| 'rail'
|
||||
| 'stream'
|
||||
| 'foot'
|
||||
| 'aroad'
|
||||
| 'minorRoad'
|
||||
| 'motorway'
|
||||
| 'waterway'
|
||||
| 'pipeline';
|
||||
roadName?: string;
|
||||
};
|
||||
export let activeElec: ElecType;
|
||||
@@ -98,11 +106,10 @@
|
||||
{#if isOver}
|
||||
<BaseTrack {activeElec} height={64} />
|
||||
|
||||
<!-- White edge, to provide separation between abutment line and bridge content -->
|
||||
<rect x="0" y={32 - s.width / 2 - 4} width="64" height={s.width + 8} fill="white" />
|
||||
|
||||
<!-- White edge, to provide separation between abutment line and bridge content -->
|
||||
<rect x=0 y={32 - (s.width / 2) - 4} width="64" height="{s.width + 8}" fill="white" />
|
||||
|
||||
<rect x="6" y={32 - (s.width / 2)} width="52" height={s.width} fill={s.bg} />
|
||||
<rect x="6" y={32 - s.width / 2} width="52" height={s.width} fill={s.bg} />
|
||||
|
||||
{#if s.type === 'road'}
|
||||
<line
|
||||
@@ -120,15 +127,17 @@
|
||||
<line x1={xLeft} y1="36" x2={xRight} y2="36" stroke="#cbd5e1" stroke-width="1.5" />
|
||||
{/if}
|
||||
|
||||
<g fill="none" stroke={s.stroke} stroke-width="2.5" stroke-linecap="square">
|
||||
<path d={`M 20 ${32 - s.width / 2 - 6} L 20 ${32 - s.width / 2 - 4} L 44 ${32 - s.width / 2 - 4} L 44 ${32 - s.width / 2 - 6}`} />
|
||||
|
||||
<path d={`M 20 ${32 + s.width / 2 + 6} L 20 ${32 + s.width / 2 + 4} L 44 ${32 + s.width / 2 + 4} L 44 ${32 + s.width / 2 + 6}`} />
|
||||
</g>
|
||||
<g fill="none" stroke={s.stroke} stroke-width="2.5" stroke-linecap="square">
|
||||
<path
|
||||
d={`M 20 ${32 - s.width / 2 - 6} L 20 ${32 - s.width / 2 - 4} L 44 ${32 - s.width / 2 - 4} L 44 ${32 - s.width / 2 - 6}`}
|
||||
/>
|
||||
|
||||
<path
|
||||
d={`M 20 ${32 + s.width / 2 + 6} L 20 ${32 + s.width / 2 + 4} L 44 ${32 + s.width / 2 + 4} L 44 ${32 + s.width / 2 + 6}`}
|
||||
/>
|
||||
</g>
|
||||
{:else}
|
||||
|
||||
|
||||
<rect x="6" y={32 - (s.width / 2)} width="52" height={s.width} fill={s.bg} />
|
||||
<rect x="6" y={32 - s.width / 2} width="52" height={s.width} fill={s.bg} />
|
||||
|
||||
{#if s.type === 'road'}
|
||||
<line
|
||||
@@ -148,9 +157,13 @@
|
||||
|
||||
<rect x="26" y={yTop} width="12" height="64" fill="white" />
|
||||
<g stroke={s.stroke} stroke-width="2.5" fill="none" stroke-linecap="square">
|
||||
<path d={`M 24 ${(32 - (s.width / 2)) - 5} L 25 ${(32 - (s.width / 2)) - 5} L 25 ${(32 - (s.width / 2)) + s.width + 5} L 24 ${(32 - (s.width / 2)) + s.width + 5}`} />
|
||||
<path
|
||||
d={`M 24 ${32 - s.width / 2 - 5} L 25 ${32 - s.width / 2 - 5} L 25 ${32 - s.width / 2 + s.width + 5} L 24 ${32 - s.width / 2 + s.width + 5}`}
|
||||
/>
|
||||
|
||||
<path d={`M 40 ${(32 - (s.width / 2)) - 5} L 39 ${(32 - (s.width / 2)) - 5} L 39 ${(32 - (s.width / 2)) + s.width + 5} L 40 ${(32 - (s.width / 2)) + s.width + 5}`} />
|
||||
<path
|
||||
d={`M 40 ${32 - s.width / 2 - 5} L 39 ${32 - s.width / 2 - 5} L 39 ${32 - s.width / 2 + s.width + 5} L 40 ${32 - s.width / 2 + s.width + 5}`}
|
||||
/>
|
||||
</g>
|
||||
|
||||
<BaseTrack {activeElec} height={64} />
|
||||
|
||||
Reference in New Issue
Block a user