diff --git a/src/drawApp/lineScene.ts b/src/drawApp/lineScene.ts index 64bfa84..d94d2c9 100644 --- a/src/drawApp/lineScene.ts +++ b/src/drawApp/lineScene.ts @@ -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) { diff --git a/src/graphics/train/Train.ts b/src/graphics/train/Train.ts index 2870fa1..f64a29d 100644 --- a/src/graphics/train/Train.ts +++ b/src/graphics/train/Train.ts @@ -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 = []; 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);