This commit is contained in:
fan 2022-05-27 15:55:22 +08:00
commit 6c5c2b8d4f
2 changed files with 17 additions and 18 deletions

View File

@ -1,4 +1,3 @@
/* 观的角度来看当前所处的位置。 */
import Group from 'zrender/src/container/Group';
import TrainBodyBox from './TrainBodyBox';
// import '../StationStand/EDetain';
@ -302,8 +301,8 @@ export default class TrainBody extends Group {
// Style('fill', color);
}
setTrainBorderColor(color) {
this.trainBodyBox && this.trainBodyBox.setColor('stroke', color);
}
this.trainBodyBox && this.trainBodyBox.setColor('stroke', color);
}
setHShow(isShow) {
if (this.textH) {
isShow ? this.textH.show() : this.textH.hide();

View File

@ -226,7 +226,7 @@ export default class Train extends Group {
this.trainR && this.trainR.setLineShow(false);
this.trainL && this.trainL.setArrowShow(false);
this.trainR && this.trainR.setArrowShow(false);
this.trainB && this.trainB.setTrainBorderColor(this.style.Train.trainBody.trainSidelineColor || this.style.trainSidelineColor);
this.trainB && this.trainB.setTrainBorderColor(this.style.Train.trainBody.trainSidelineColor || this.style.trainSidelineColor);
}
// 设置运行方向状态类型
@ -267,20 +267,20 @@ export default class Train extends Group {
this.trainL && this.trainL.setArrowShow(item.arrowLShow);
this.trainR && this.trainR.setArrowShow(item.arrowRShow);
}
} else if(this.style.Train.trainHead.directionStopType == 'specialAll'){
if (flag) {
this.trainL && this.trainL.setArrowShow(!item.arrowLShow);
this.trainR && this.trainR.setArrowShow(!item.arrowRShow);
this.trainL && this.trainL.setLineShow(!item.lineLShow);
this.trainR && this.trainR.setLineShow(!item.lineRShow);
} else {
this.trainL && this.trainL.setArrowShow(item.arrowLShow);
this.trainR && this.trainR.setArrowShow(item.arrowRShow);
this.trainL && this.trainL.setLineShow(item.lineLShow);
this.trainR && this.trainR.setLineShow(item.lineRShow);
}
this.trainB && this.trainB.setTrainBorderColor(this.style.Train.trainBody.trainSidelineStopColor);
} else {
} else if (this.style.Train.trainHead.directionStopType == 'specialAll') {
if (flag) {
this.trainL && this.trainL.setArrowShow(!item.arrowLShow);
this.trainR && this.trainR.setArrowShow(!item.arrowRShow);
this.trainL && this.trainL.setLineShow(!item.lineLShow);
this.trainR && this.trainR.setLineShow(!item.lineRShow);
} else {
this.trainL && this.trainL.setArrowShow(item.arrowLShow);
this.trainR && this.trainR.setArrowShow(item.arrowRShow);
this.trainL && this.trainL.setLineShow(item.lineLShow);
this.trainR && this.trainR.setLineShow(item.lineRShow);
}
this.trainB && this.trainB.setTrainBorderColor(this.style.Train.trainBody.trainSidelineStopColor);
} else {
if (flag) {
this.trainL && this.trainL.setLineShow(!item.lineLShow);
this.trainR && this.trainR.setLineShow(!item.lineRShow);