调整开门状态

This commit is contained in:
zyy 2020-02-19 16:19:37 +08:00
parent 8234c8b817
commit cc717f86e6
4 changed files with 17 additions and 7 deletions

View File

@ -101,7 +101,17 @@ class ESafeDoor extends Group {
}
hasDoor(show) {
show ? this.safeC.hide() : this.safeC.show();
if (this.model.style.StationStand.common.special) {
if (show) {
this.stand1.hide();
this.stand2.hide();
} else {
this.stand1.show();
this.stand2.show();
}
} else {
show ? this.safeC.hide() : this.safeC.show();
}
}
setColor(color) {

View File

@ -27,8 +27,8 @@ export default class Line2 extends Group {
x: model.position.x,
y: model.position.y - (model.height / 2),
width: model.width || style.StationStand.safetyDoor.width,
height: model.height || style.StationStand.safetyDoor.height,
show: model.hasDoor
height: model.height || style.StationStand.safetyDoor.height
// show: model.hasDoor
});
this.add(this.safeDoor);
}

View File

@ -35,7 +35,7 @@ class ESafeEmergent extends Group {
[width - 3, height + 3],
[width - 7, height + 3],
[width - 7, height],
[width, height - 3],
[width, height - 3]
]
},
style: {

View File

@ -241,9 +241,9 @@ class StationStand extends Group {
if (!this.style.StationStand.common.special) {
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.stopColor);
} else {
this.trainStop && this.trainStop.show();
this.trainDepart && this.trainDepart.show();
}
this.trainStop && this.trainStop.show();
this.trainDepart && this.trainDepart.show();
}
}
/** 站台紧急关闭*/