diff --git a/src/jmapNew/shape/Station/EStationText.js b/src/jmapNew/shape/Station/EStationText.js index f6b8418a9..f90c552d3 100644 --- a/src/jmapNew/shape/Station/EStationText.js +++ b/src/jmapNew/shape/Station/EStationText.js @@ -62,6 +62,14 @@ class EStationText extends Group { 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; diff --git a/src/jmapNew/shape/Station/index.js b/src/jmapNew/shape/Station/index.js index f2c31b1fe..13ca73a0d 100644 --- a/src/jmapNew/shape/Station/index.js +++ b/src/jmapNew/shape/Station/index.js @@ -325,12 +325,13 @@ export default class Station extends Group { 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.setTextColor(this.style.Station.StationControl.lamp.greenColor); // 文字颜色 - if (this.style.Station.StationControl.disPlayNone) { - this.stationText && this.stationText.setStyle('textFill', '#1fdc1f'); - if (this.model.subheadDisplay) { // 副标题 - this.subheadText && this.subheadText.setStyle('textFill', '#1fdc1f'); - } - } + this.stationText.setColor('#1fdc1f'); + // if (this.style.Station.StationControl.disPlayNone) { + // this.stationText && this.stationText.setStyle('textFill', '#1fdc1f'); + // if (this.model.subheadDisplay) { // 副标题 + // this.subheadText && this.subheadText.setStyle('textFill', '#1fdc1f'); + // } + // } } handleLocal() { // 站控 @@ -339,12 +340,13 @@ export default class Station extends Group { this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.lamp.yellowColor); // 文字颜色 this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor); - if (this.style.Station.StationControl.disPlayNone) { - this.stationText && this.stationText.setStyle('textFill', '#fff'); - if (this.model.subheadDisplay) { // 副标题 - this.subheadText && this.subheadText.setStyle('textFill', '#fff'); - } - } + // if (this.style.Station.StationControl.disPlayNone) { + // this.stationText && this.stationText.setStyle('textFill', '#fff'); + // if (this.model.subheadDisplay) { // 副标题 + // this.subheadText && this.subheadText.setStyle('textFill', '#fff'); + // } + // } + this.stationText.setColor('#fff'); } handleEmergency() { // 紧急站控 @@ -353,21 +355,23 @@ export default class Station extends Group { this.substationControl && this.substationControl.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); - if (this.style.Station.StationControl.disPlayNone) { - this.stationText && this.stationText.setStyle('textFill', '#fff'); - if (this.model.subheadDisplay) { // 副标题 - this.subheadText && this.subheadText.setStyle('textFill', '#fff'); - } - } + // if (this.style.Station.StationControl.disPlayNone) { + // this.stationText && this.stationText.setStyle('textFill', '#fff'); + // if (this.model.subheadDisplay) { // 副标题 + // this.subheadText && this.subheadText.setStyle('textFill', '#fff'); + // } + // } + this.stationText.setColor('#fff'); } handleNone() { // 空 - if (this.style.Station.StationControl.disPlayNone) { // 没有控制时显示 黄色 - this.stationText && this.stationText.setStyle('textFill', '#FFFF00'); - if (this.model.subheadDisplay) { // 副标题 - this.subheadText && this.subheadText.setStyle('textFill', '#FFFF00'); - } - } + // if (this.style.Station.StationControl.disPlayNone) { // 没有控制时显示 黄色 + // this.stationText && this.stationText.setStyle('textFill', '#FFFF00'); + // if (this.model.subheadDisplay) { // 副标题 + // this.subheadText && this.subheadText.setStyle('textFill', '#FFFF00'); + // } + // } + this.stationText.setColor('#FFFF00'); } // /** 恢复初始状态*/