Browse Source

[完善] 完善管线

develop
徐振升 4 years ago
parent
commit
0816c7abd9
  1. 28
      src/app/working-area/working-area.component.ts

28
src/app/working-area/working-area.component.ts

@ -786,6 +786,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
} else { } else {
this.paintingArrows.ready = true; this.paintingArrows.ready = true;
this.paintingArrows = null; this.paintingArrows = null;
this.paintMode = PaintMode.endPaint;
} }
break; break;
} }
@ -1811,18 +1812,25 @@ export class Pipeline extends PIXI.Graphics {
this.moveTo(pointA.x, pointA.y); this.moveTo(pointA.x, pointA.y);
} else { } else {
this.lineTo(pointA.x, pointA.y); 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) { this.endFill();
const pointA = this.assetData.MultiPoint[0]; // if (this.assetData.MultiPoint.length >= 2) {
const pointB = this.assetData.MultiPoint[this.assetData.MultiPoint.length - 1]; // const pointA = this.assetData.MultiPoint[this.assetData.MultiPoint.length - 2];
const angle = Math.atan2((pointB.y - pointA.y), (pointB.x - pointA.x)) * (180 / Math.PI) + 90; // const pointB = this.assetData.MultiPoint[this.assetData.MultiPoint.length - 1];
this.beginFill(0x0000ff); // const angle = Math.atan2((pointB.y - pointA.y), (pointB.x - pointA.x)) * (180 / Math.PI) + 90;
this.drawStar(pointB.x, pointB.y, 3, 5, 0, (Math.PI / 180 * angle)); // this.beginFill(0x0000ff);
// this.drawCircle(pointA.x, pointA.y, 5); // this.drawStar(pointB.x, pointB.y, 3, 5, 0, (Math.PI / 180 * angle));
// this.drawCircle(pointB.x, pointB.y, 5); // this.endFill();
this.endFill(); // }
}
} }
} }
/** /**

Loading…
Cancel
Save