邵佳豪 4 years ago
parent
commit
2f8e957884
  1. 26
      src/app/working-area/working-area.component.ts

26
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();
// }
}
}
/**

Loading…
Cancel
Save