From f0495153e666edac05d51dd0744a385dc2af4757 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Wed, 30 Oct 2024 13:45:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E8=BD=B4=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../axleCounting/AxleCountingDrawAssistant.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/graphics/axleCounting/AxleCountingDrawAssistant.ts b/src/graphics/axleCounting/AxleCountingDrawAssistant.ts index c2d16a8..7f3ac97 100644 --- a/src/graphics/axleCounting/AxleCountingDrawAssistant.ts +++ b/src/graphics/axleCounting/AxleCountingDrawAssistant.ts @@ -102,6 +102,18 @@ export class AxleCountingDraw extends GraphicDrawAssistant< port == TurnoutPort.B && refPort == TurnoutPort.B ) { + //查看生成计轴bb配置 + let hasBB = false; + if (generateAxleCountingConfig !== undefined) { + const bbConnect = generateAxleCountingConfig.bbConnect; + if ( + bbConnect.includes(graphic.id) || + bbConnect.includes(refGraphic.id) + ) { + hasBB = true; + } + } + //bb连接处有信号机需要生成 const points = (graphic as Turnout).getPortPoints(); const portPs = graphic.localToCanvasPoints(points[1][0])[0]; let hasSingle = false; @@ -111,7 +123,7 @@ export class AxleCountingDraw extends GraphicDrawAssistant< hasSingle = true; } }); - if (!hasSingle) { + if (!hasSingle && !hasBB) { map.set(`${graphic.id}-${port}`, 1); map.set(`${refGraphic.id}-${refPort}`, 1); return;