diff --git a/src/graphics/axleCounting/AxleCountingDrawAssistant.ts b/src/graphics/axleCounting/AxleCountingDrawAssistant.ts index 5bf75bb..6931f49 100644 --- a/src/graphics/axleCounting/AxleCountingDrawAssistant.ts +++ b/src/graphics/axleCounting/AxleCountingDrawAssistant.ts @@ -81,7 +81,6 @@ export class AxleCountingDraw extends GraphicDrawAssistant< refPort: TurnoutPort | SectionPort ) { const generateAxleCountingConfig = loadGenerateAxleCountingConfig(); - let hasNoGenerateGroup = false; if (generateAxleCountingConfig?.noGenerateGroup !== undefined) { const noGenerateGroup = generateAxleCountingConfig.noGenerateGroup; for (let i = 0; i < noGenerateGroup.length; i++) { @@ -90,15 +89,12 @@ export class AxleCountingDraw extends GraphicDrawAssistant< ((i % 2 == 0 && refGraphic.id == noGenerateGroup[i + 1]) || (i % 2 == 1 && refGraphic.id == noGenerateGroup[i - 1])) ) { - hasNoGenerateGroup = true; + map.set(`${graphic.id}-${port}`, 1); + map.set(`${refGraphic.id}-${refPort}`, 1); + return; } } } - if (hasNoGenerateGroup) { - map.set(`${graphic.id}-${port}`, 1); - map.set(`${refGraphic.id}-${refPort}`, 1); - return; - } if ( graphic.type == 'Turnout' && reftype == 'Turnout' &&