From a836d27a81ced1e340a61e2a04c17b2390cff23e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Mon, 14 Dec 2020 16:34:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=A2=99=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E6=9C=AA=E5=8F=91=E9=80=81=E5=88=9B=E5=BB=BA=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/working-area/model/axArrowConnector.ts | 2 +- src/app/working-area/working-area.component.ts | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/app/working-area/model/axArrowConnector.ts b/src/app/working-area/model/axArrowConnector.ts index a4c8b30..f6e1c17 100644 --- a/src/app/working-area/model/axArrowConnector.ts +++ b/src/app/working-area/model/axArrowConnector.ts @@ -47,9 +47,9 @@ export class AxArrowConnector extends AxShape { */ public refresh(c: PIXI.Graphics, pts: PIXI.Point[]): void { if (pts.length < 2) { - this.text.position = pts[0]; return; } + this.text.position = pts[0]; const strokeWidth = 1; const startWidth = 30 + strokeWidth; const endWidth = 30 + strokeWidth; diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 566b3bd..f497eae 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -531,7 +531,11 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV const polygonIcon = new PolygonIcon(floorData[key], this); break; case 3: - const pipeline = new Pipeline(floorData[key], this); + if (floorData[key].Name === '水带') { + const pipeline = new Pipeline(floorData[key], this); + } else { + const wall = new AxArrowConnector(floorData[key], this); + } break; } }); @@ -1152,7 +1156,10 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.emit('createIcon', polygonIcon); } case PaintMode.Pipeline: - this.paintingShape = null; + if (this.canvasData.selectTemplateData.name !== '水带') { + this.emit('createIcon', this.paintingShape); + this.paintingShape = null; + } break; } this.paintPoints.splice(0, this.paintPoints.length);