From f13de18397653218f8e65800278b8654ce2825d5 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Thu, 29 Jun 2023 18:27:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/graphics/axleCounting/AxleCountingDrawAssistant.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/graphics/axleCounting/AxleCountingDrawAssistant.ts b/src/graphics/axleCounting/AxleCountingDrawAssistant.ts index 9071f8e..c06ed97 100644 --- a/src/graphics/axleCounting/AxleCountingDrawAssistant.ts +++ b/src/graphics/axleCounting/AxleCountingDrawAssistant.ts @@ -170,10 +170,7 @@ export class AxleCountingDraw extends GraphicDrawAssistant< sections.forEach((section) => { const sectionRelations = - section.relationManage.getRelationsOfGraphicAndOtherType( - section, - Section.Type - ); + section.relationManage.getRelationsOfGraphic(section); const ps = section.localToCanvasPoint(section.getStartPoint()); const pe = section.localToCanvasPoint(section.getEndPoint()); sectionRelations.forEach((relation) => { @@ -209,7 +206,7 @@ export class AxleCountingDraw extends GraphicDrawAssistant< ); const ps = section.localToCanvasPoint(section.getStartPoint()); const pe = section.localToCanvasPoint(section.getEndPoint()); - if (axleCountingRelations.length < 2) { + if (axleCountingRelations.length == 1) { axleCountingRelations.forEach((relation) => { const port = relation.getRelationParam(section).param; let addPort = SectionPort.A;