From 074f6d647a0dfdca83c27df0f1ba8d7ffa0c009f Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 20 Apr 2020 10:12:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A5=BF=E5=AE=89=E4=BA=8C=E5=8F=B7=E7=BA=BF?= =?UTF-8?q?=E7=AB=99=E5=8F=B0=20=E7=B4=A7=E6=80=A5=E5=81=9C=E8=BD=A6?= =?UTF-8?q?=E7=8A=B6=E6=80=81=20=E7=BB=98=E5=9B=BE=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/xian_02.js | 8 ++--- .../shape/StationStand/ESafeEmergent.js | 34 +++++++++++++++++++ 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/src/jmapNew/config/skinCode/xian_02.js b/src/jmapNew/config/skinCode/xian_02.js index 6c27decde..e39001621 100644 --- a/src/jmapNew/config/skinCode/xian_02.js +++ b/src/jmapNew/config/skinCode/xian_02.js @@ -245,10 +245,10 @@ class SkinCode extends defaultStyle { doorOpenColor:'#007f00' // 车门开启状态颜色(西安二号线线路样式) }, standEmergent: { // 紧急关闭 - mergentR: 7, // 站台紧急关闭半径 - mergentN: 8, // 站台紧急关闭边数 - insideOffset: { x: 0, y: 40 }, // 内站台紧急关闭偏移量 - outsideOffset: { x: 0, y: -40}, // 外站台紧急关闭偏移量 + mergentR: 9, // 站台紧急关闭半径 + mergentN: 8, // 站台紧急关闭边数(西安二号线特殊样式) + insideOffset: { x: 0, y: 50 }, // 内站台紧急关闭偏移量 + outsideOffset: { x: 0, y: -50}, // 外站台紧急关闭偏移量 closeColor: 'red', // 站台紧急关闭颜色 defaultColor:'#808080', // 西安二号线特殊样式(默认颜色) special:true // 西安二号线特殊样式 diff --git a/src/jmapNew/shape/StationStand/ESafeEmergent.js b/src/jmapNew/shape/StationStand/ESafeEmergent.js index 6d84b5a74..fa735e890 100644 --- a/src/jmapNew/shape/StationStand/ESafeEmergent.js +++ b/src/jmapNew/shape/StationStand/ESafeEmergent.js @@ -1,6 +1,7 @@ import Group from 'zrender/src/container/Group'; import Isogon from 'zrender/src/graphic/shape/Isogon'; import Polygon from 'zrender/src/graphic/shape/Polygon'; +import Line from 'zrender/src/graphic/shape/Line'; import {arrow} from '../utils/ShapePoints'; class ESafeEmergent extends Group { @@ -58,9 +59,42 @@ class ESafeEmergent extends Group { } this.add(this.emergent); if (style.StationStand.standEmergent.special) { + // r*Math.r*cos(Math.PI/180*22.5) + // Math.sin(Math.PI/180*50) + // Math.cos(Math.PI/180*50) this.emergent.rotation = Math.PI / 8; this.emergent.origin = [model.x, model.y]; this.emergent.dirty(); + this.emergentLine1 = new Line({ + zlevel: model.zlevel, + z: model.z, + shape:{ + x1:model.x - model.r * 0.5939, + y1:model.y - model.r * 0.7077, + x2:model.x + model.r * 0.5939, + y2:model.y + model.r * 0.7077 + }, + style:{ + lineWidth:2, + stroke:style.StationStand.standEmergent.defaultColor + } + }); + this.emergentLine2 = new Line({ + zlevel: model.zlevel, + z: model.z, + shape:{ + x1:model.x + model.r * 0.5939, + y1:model.y - model.r * 0.7077, + x2:model.x - model.r * 0.5939, + y2:model.y + model.r * 0.7077 + }, + style:{ + lineWidth:2, + stroke:style.StationStand.standEmergent.defaultColor + } + }); + this.add(this.emergentLine1); + this.add(this.emergentLine2); } } }