|
10 | 10 | import LageplanFeature from '@/feature/LageplanFeature' |
11 | 11 | import ContinuousTrackSegment from '@/model/ContinuousTrackSegment' |
12 | 12 | import { Coordinate, Position } from '@/model/Position' |
13 | | -import { SiteplanColorValue, SiteplanState } from '@/model/SiteplanModel' |
| 13 | +import { LeftRight, SiteplanColorValue, SiteplanState } from '@/model/SiteplanModel' |
14 | 14 | import { getColor, getLabelColor } from '@/model/SiteplanObject' |
15 | 15 | import TrackSwitch, { SwitchType, TrackSwitchPart } from '@/model/TrackSwitch' |
16 | 16 | import TrackSwitchComponent, { TurnoutOperatingMode } from '@/model/TrackSwitchComponent' |
@@ -202,16 +202,16 @@ export default class TrackSwitchFeature extends LageplanFeature<TrackSwitch> { |
202 | 202 |
|
203 | 203 | return SvgDrawTrackSwitch.getTrailableArrow(arrowCoors,color, scale) |
204 | 204 | case TurnoutOperatingMode.DeadLeft: |
205 | | - return this.getTrackSwitchLockCross(component, 'links', scale) |
| 205 | + return this.getTrackSwitchLockCross(component, LeftRight.LEFT, scale) |
206 | 206 | case TurnoutOperatingMode.DeadRight: |
207 | | - return this.getTrackSwitchLockCross(component, 'rechts', scale) |
| 207 | + return this.getTrackSwitchLockCross(component, LeftRight.RIGHT, scale) |
208 | 208 | default: |
209 | 209 | return [] |
210 | 210 | } |
211 | 211 | } |
212 | 212 |
|
213 | 213 | private getTrackSwitchLockCross (component: TrackSwitchComponent, lockSide: string, scale: number) { |
214 | | - if (component.mainLeg.connection.toLowerCase() === lockSide) { |
| 214 | + if (component.mainLeg.connection.toLowerCase() === lockSide.toLowerCase()) { |
215 | 215 | const sideLegCoorsLength = component.sideLeg.coordinates.length |
216 | 216 | const lastPos = component.sideLeg.coordinates[sideLegCoorsLength - 1] |
217 | 217 | const preLastPos = component.sideLeg.coordinates[sideLegCoorsLength - 2] |
|
0 commit comments