This commit is contained in:
joylink_zhaoerwei 2023-11-10 17:38:07 +08:00
parent 7a8b5c2eb4
commit 8c639ce242

View File

@ -81,7 +81,6 @@ export class AxleCountingDraw extends GraphicDrawAssistant<
refPort: TurnoutPort | SectionPort refPort: TurnoutPort | SectionPort
) { ) {
const generateAxleCountingConfig = loadGenerateAxleCountingConfig(); const generateAxleCountingConfig = loadGenerateAxleCountingConfig();
let hasNoGenerateGroup = false;
if (generateAxleCountingConfig?.noGenerateGroup !== undefined) { if (generateAxleCountingConfig?.noGenerateGroup !== undefined) {
const noGenerateGroup = generateAxleCountingConfig.noGenerateGroup; const noGenerateGroup = generateAxleCountingConfig.noGenerateGroup;
for (let i = 0; i < noGenerateGroup.length; i++) { 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 == 0 && refGraphic.id == noGenerateGroup[i + 1]) ||
(i % 2 == 1 && 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 ( if (
graphic.type == 'Turnout' && graphic.type == 'Turnout' &&
reftype == 'Turnout' && reftype == 'Turnout' &&