This commit is contained in:
fan 2020-11-16 10:11:57 +08:00
commit 217ae8c2de
2 changed files with 36 additions and 24 deletions

View File

@ -62,6 +62,14 @@ class EStationText extends Group {
setState() { setState() {
} }
setColor(color) {
const style = this.model.style;
if (style.Station.StationControl.disPlayNone) {
this.stationName.setStyle('textFill', color);
this.subheadText && this.subheadText.setStyle('textFill', color);
}
}
} }
export default EStationText; export default EStationText;

View File

@ -325,12 +325,13 @@ export default class Station extends Group {
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.greenColor); this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.greenColor);
this.centerControl && this.centerControl.setTextColor(this.style.Station.StationControl.lamp.greenColor); // 文字颜色 this.centerControl && this.centerControl.setTextColor(this.style.Station.StationControl.lamp.greenColor); // 文字颜色
if (this.style.Station.StationControl.disPlayNone) { this.stationText.setColor('#1fdc1f');
this.stationText && this.stationText.setStyle('textFill', '#1fdc1f'); // if (this.style.Station.StationControl.disPlayNone) {
if (this.model.subheadDisplay) { // 副标题 // this.stationText && this.stationText.setStyle('textFill', '#1fdc1f');
this.subheadText && this.subheadText.setStyle('textFill', '#1fdc1f'); // if (this.model.subheadDisplay) { // 副标题
} // this.subheadText && this.subheadText.setStyle('textFill', '#1fdc1f');
} // }
// }
} }
handleLocal() { // 站控 handleLocal() { // 站控
@ -339,12 +340,13 @@ export default class Station extends Group {
this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.lamp.yellowColor); // 文字颜色 this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.lamp.yellowColor); // 文字颜色
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor); this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
if (this.style.Station.StationControl.disPlayNone) { // if (this.style.Station.StationControl.disPlayNone) {
this.stationText && this.stationText.setStyle('textFill', '#fff'); // this.stationText && this.stationText.setStyle('textFill', '#fff');
if (this.model.subheadDisplay) { // 副标题 // if (this.model.subheadDisplay) { // 副标题
this.subheadText && this.subheadText.setStyle('textFill', '#fff'); // this.subheadText && this.subheadText.setStyle('textFill', '#fff');
} // }
} // }
this.stationText.setColor('#fff');
} }
handleEmergency() { // 紧急站控 handleEmergency() { // 紧急站控
@ -353,21 +355,23 @@ export default class Station extends Group {
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor); this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
if (this.style.Station.StationControl.disPlayNone) { // if (this.style.Station.StationControl.disPlayNone) {
this.stationText && this.stationText.setStyle('textFill', '#fff'); // this.stationText && this.stationText.setStyle('textFill', '#fff');
if (this.model.subheadDisplay) { // 副标题 // if (this.model.subheadDisplay) { // 副标题
this.subheadText && this.subheadText.setStyle('textFill', '#fff'); // this.subheadText && this.subheadText.setStyle('textFill', '#fff');
} // }
} // }
this.stationText.setColor('#fff');
} }
handleNone() { // 空 handleNone() { // 空
if (this.style.Station.StationControl.disPlayNone) { // 没有控制时显示 黄色 // if (this.style.Station.StationControl.disPlayNone) { // 没有控制时显示 黄色
this.stationText && this.stationText.setStyle('textFill', '#FFFF00'); // this.stationText && this.stationText.setStyle('textFill', '#FFFF00');
if (this.model.subheadDisplay) { // 副标题 // if (this.model.subheadDisplay) { // 副标题
this.subheadText && this.subheadText.setStyle('textFill', '#FFFF00'); // this.subheadText && this.subheadText.setStyle('textFill', '#FFFF00');
} // }
} // }
this.stationText.setColor('#FFFF00');
} }
// /** 恢复初始状态*/ // /** 恢复初始状态*/