From a53798ebbe6b6cae9744fb87c2f8e31b51bcc9b5 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 27 May 2022 13:08:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/graph/Train/TrainBody.js | 5 ++-- src/jmapNew/shape/graph/Train/index.js | 30 +++++++++++----------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/jmapNew/shape/graph/Train/TrainBody.js b/src/jmapNew/shape/graph/Train/TrainBody.js index cf69aa789..f0638ec8a 100644 --- a/src/jmapNew/shape/graph/Train/TrainBody.js +++ b/src/jmapNew/shape/graph/Train/TrainBody.js @@ -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(); diff --git a/src/jmapNew/shape/graph/Train/index.js b/src/jmapNew/shape/graph/Train/index.js index 2358832a0..7af64ad8f 100644 --- a/src/jmapNew/shape/graph/Train/index.js +++ b/src/jmapNew/shape/graph/Train/index.js @@ -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);