列车车头调整

This commit is contained in:
joylink_fanyuhong 2024-05-11 09:58:23 +08:00
parent 182ea7c099
commit a4231d1813
2 changed files with 3 additions and 2 deletions

View File

@ -470,6 +470,7 @@ function handleSubscribe(lineScene: IGraphicScene) {
states.push(new CarWashingState(item));
}
});
console.log(storage.allStatus.trainState, '====');
storage.allStatus.trainState.forEach((item) => {
// 列车
if (!item.show) {

View File

@ -335,7 +335,7 @@ export class TrainHead extends Container {
];
// 道岔时运行x轴是否在增大决定箭头方向
// 区段时是否从A到B决定箭头方向
if (states.devicePort && !this.train.arrowIsLeft) {
if (!this.train.arrowIsLeft) {
const aP: Array<number> = [];
arrowPoint.forEach((item, index) => {
if (index % 2 == 1) {
@ -346,6 +346,7 @@ export class TrainHead extends Container {
});
arrowPoint = aP;
}
this.pause.visible = true;
if (states.trainActiveDirection !== 0) {
const lineIsLeft =
this.train.arrowIsLeft &&
@ -369,7 +370,6 @@ export class TrainHead extends Container {
this.pause.visible = false;
}
const aColor = DiriveModelColorEnum.AM;
const arrow = this.arrow;
arrow.beginFill(aColor, 1);
arrow.drawPolygon(arrowPoint);