车头翻转=》 停车状态时调整车头翻转显示
This commit is contained in:
parent
830a630155
commit
2e0ba39171
@ -248,16 +248,26 @@ export default class Train extends Group {
|
||||
}
|
||||
}
|
||||
// 设置列车停止方向类型
|
||||
setDirectionStopType(right) {
|
||||
setDirectionStopType(right, flag) {
|
||||
if (this.style.Train.trainStatusStyle.directionStopType.length > 0) {
|
||||
this.style.Train.trainStatusStyle.directionStopType.forEach((item) => {
|
||||
if (right == item.type) {
|
||||
if (this.style.Train.trainHead.directionStopType == 'special') {
|
||||
this.trainL && this.trainL.setArrowShow(item.lineLShow);
|
||||
this.trainR && this.trainR.setArrowShow(item.lineRShow);
|
||||
if (flag) {
|
||||
this.trainL && this.trainL.setArrowShow(!item.lineLShow);
|
||||
this.trainR && this.trainR.setArrowShow(!item.lineRShow);
|
||||
} else {
|
||||
this.trainL && this.trainL.setArrowShow(item.lineLShow);
|
||||
this.trainR && this.trainR.setArrowShow(item.lineRShow);
|
||||
}
|
||||
} else {
|
||||
this.trainL && this.trainL.setLineShow(item.lineLShow);
|
||||
this.trainR && this.trainR.setLineShow(item.lineRShow);
|
||||
if (flag) {
|
||||
this.trainL && this.trainL.setLineShow(!item.lineLShow);
|
||||
this.trainR && this.trainR.setLineShow(!item.lineRShow);
|
||||
} else {
|
||||
this.trainL && this.trainL.setLineShow(item.lineLShow);
|
||||
this.trainR && this.trainR.setLineShow(item.lineRShow);
|
||||
}
|
||||
this.triangle && this.triangle.setStopShow(true); // 停车
|
||||
}
|
||||
return true;
|
||||
@ -268,7 +278,7 @@ export default class Train extends Group {
|
||||
// 设置运行状态
|
||||
setRunStatus(status, flag) {
|
||||
if (status) {
|
||||
this.setDirectionStopType(this.model.right); // 设置运行方向状态类型
|
||||
this.setDirectionStopType(this.model.right, flag); // 设置运行方向状态类型
|
||||
} else {
|
||||
this.setDirectionType(this.model.right, flag); // 设置运行方向状态类型
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user