From 10ed69f5ec922e828fbc5697da8fc66bae107642 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 19 Jan 2021 17:44:18 +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/config/skinCode/nanjing_02.js | 8 ++++---- src/jmapNew/shape/StationStand/EStationPlatform.js | 9 +++++---- src/jmapNew/shape/StationStand/detain/EDetain.js | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/jmapNew/config/skinCode/nanjing_02.js b/src/jmapNew/config/skinCode/nanjing_02.js index 31e6cc541..98e1a0c04 100644 --- a/src/jmapNew/config/skinCode/nanjing_02.js +++ b/src/jmapNew/config/skinCode/nanjing_02.js @@ -309,8 +309,8 @@ class SkinCode extends defaultStyle { position: 1, // 扣车标识在站台上显示方向 special:true, text: 'H', // 扣车显示内容 - insideOffset: { x: 85, y: -18 }, // 内站台扣车偏移量 - outsideOffset: { x:85, y: 22 }, // 外站台扣车偏移量 + insideOffset: { x: 15, y: -28 }, // 内站台扣车偏移量 + outsideOffset: { x:15, y: 22 }, // 外站台扣车偏移量 centerTrainColor: '#ff0', // 中心扣车颜色 andCenterTrainColor: '#ff0', // 车站+中心扣车颜色 detainTrainTextColor: '#ff0', // 车站扣除文字颜色 @@ -357,8 +357,8 @@ class SkinCode extends defaultStyle { // 站台 扣车/取消扣车,越站/取消越站 设置按钮 stationPlatform:{ z:1, - insideOffset: { x: 50, y: -20 }, // 内站台按钮偏移量 - outsideOffset: { x: 50, y: 20}, // 外站台按钮偏移量 + insideOffset: { y: -20 }, // 内站台按钮偏移量 + outsideOffset: { y: 20}, // 外站台按钮偏移量 detainColor:'#FFFF00', // 扣车颜色 defaultColor:'#BFBFBF', // 默认颜色 jumpColor:'#00FF00' // 跳停颜色 diff --git a/src/jmapNew/shape/StationStand/EStationPlatform.js b/src/jmapNew/shape/StationStand/EStationPlatform.js index 369969abe..a52e4aa52 100644 --- a/src/jmapNew/shape/StationStand/EStationPlatform.js +++ b/src/jmapNew/shape/StationStand/EStationPlatform.js @@ -15,7 +15,8 @@ class EStationPlatform extends Group { const buttonD = model.right ? 1 : -1; const platFormOffset = model.inside ? style.StationStand.stationPlatform.insideOffset : style.StationStand.stationPlatform.outsideOffset; - const buttonX = model.position.x - buttonD * (platFormOffset.x - model.width / 2); + const buttonX = model.position.x - buttonD * ( model.width / 2 - 20); + // platFormOffset.x - const buttonY = model.position.y + buttonD * (platFormOffset.y + buttonD * model.height / 2); this.stationPlatform = new Polygon({ zlevel: this.model.zlevel, @@ -49,8 +50,8 @@ class EStationPlatform extends Group { this.stationPlatform && this.stationPlatform.setStyle({fill:color}); } recover() { - console.log(this.model.modelData, 22222222222); - console.log(this.model.modelData.code, 111111111); + // console.log(this.model.modelData, 22222222222); + // console.log(this.model.modelData.code, 111111111); const style = this.model.style; this.setColor(style.StationStand.stationPlatform.defaultColor); } @@ -58,7 +59,7 @@ class EStationPlatform extends Group { setState(model) { const style = this.model.style; if (model.stationHoldTrain || model.centerHoldTrain) { - console.log(model.code, model.stationHoldTrain, model.centerHoldTrain); + // console.log(model.code, model.stationHoldTrain, model.centerHoldTrain); this.setColor(style.StationStand.stationPlatform.detainColor); } if (model.assignSkip || model.allSkip) { diff --git a/src/jmapNew/shape/StationStand/detain/EDetain.js b/src/jmapNew/shape/StationStand/detain/EDetain.js index 1df45306c..856b5dd0e 100644 --- a/src/jmapNew/shape/StationStand/detain/EDetain.js +++ b/src/jmapNew/shape/StationStand/detain/EDetain.js @@ -41,7 +41,7 @@ class EDetain extends Group { this.add(this.detain); if (deviceParam.special) { - this.detain.setStyle({'textPadding':[1, 3], 'textBorderColor':'#fff', 'textBorderWidth':1}); + this.detain.setStyle({x:model.position.x - detainD * (model.width / 2 + detainOffset.x), 'textPadding':[1, 3], 'textBorderColor':'#fff', 'textBorderWidth':1}); } } }