From 0816c7abd98928cea2f8f8d38e1e6eb79702954e Mon Sep 17 00:00:00 2001 From: "DESKTOP-474NEJQ\\xzsjob" <359059686@qq.com> Date: Tue, 22 Sep 2020 11:29:27 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=20=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E7=AE=A1=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../working-area/working-area.component.ts | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index b6a977b..016f93f 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -786,6 +786,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV } else { this.paintingArrows.ready = true; this.paintingArrows = null; + this.paintMode = PaintMode.endPaint; } break; } @@ -1811,18 +1812,25 @@ export class Pipeline extends PIXI.Graphics { this.moveTo(pointA.x, pointA.y); } else { this.lineTo(pointA.x, pointA.y); + if (i === count - 1) { + const pointB = this.assetData.MultiPoint[i - 1]; + const angle = Math.atan2((pointA.y - pointB.y), (pointA.x - pointB.x)) * (180 / Math.PI) + 90; + this.beginFill(0x0000ff); + this.drawStar(pointA.x, pointA.y, 3, 5, 0, (Math.PI / 180 * angle)); + } else { + this.drawCircle(pointA.x, pointA.y, 5); + } } } - if (this.assetData.MultiPoint.length >= 2) { - const pointA = this.assetData.MultiPoint[0]; - const pointB = this.assetData.MultiPoint[this.assetData.MultiPoint.length - 1]; - const angle = Math.atan2((pointB.y - pointA.y), (pointB.x - pointA.x)) * (180 / Math.PI) + 90; - this.beginFill(0x0000ff); - this.drawStar(pointB.x, pointB.y, 3, 5, 0, (Math.PI / 180 * angle)); - // this.drawCircle(pointA.x, pointA.y, 5); - // this.drawCircle(pointB.x, pointB.y, 5); - this.endFill(); - } + this.endFill(); + // if (this.assetData.MultiPoint.length >= 2) { + // const pointA = this.assetData.MultiPoint[this.assetData.MultiPoint.length - 2]; + // const pointB = this.assetData.MultiPoint[this.assetData.MultiPoint.length - 1]; + // const angle = Math.atan2((pointB.y - pointA.y), (pointB.x - pointA.x)) * (180 / Math.PI) + 90; + // this.beginFill(0x0000ff); + // this.drawStar(pointB.x, pointB.y, 3, 5, 0, (Math.PI / 180 * angle)); + // this.endFill(); + // } } } /**