From f495a2d5607c59d1df041efce10a7c12f6285edb Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Wed, 8 Apr 2020 14:06:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E5=8D=A0=E4=BD=8D=E7=AC=A6?= =?UTF-8?q?=E8=B0=83=E6=95=B4&=E7=9A=AE=E8=82=A4=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/deviceStyle.js | 1 + src/jmapNew/config/skinCode/xian_02.js | 3 ++- src/jmapNew/shape/Signal/index.js | 16 +++++++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/jmapNew/config/deviceStyle.js b/src/jmapNew/config/deviceStyle.js index dc5f1e563..27df9f677 100644 --- a/src/jmapNew/config/deviceStyle.js +++ b/src/jmapNew/config/deviceStyle.js @@ -1,5 +1,6 @@ const mapDeviceStyle = { '01': 'chengdu_01', + // '01': 'xian_02' '02': 'fuzhou_01', '03': 'bejing_01', '04': 'chengdu_03', diff --git a/src/jmapNew/config/skinCode/xian_02.js b/src/jmapNew/config/skinCode/xian_02.js index c0c5858d4..4fca90b84 100644 --- a/src/jmapNew/config/skinCode/xian_02.js +++ b/src/jmapNew/config/skinCode/xian_02.js @@ -137,7 +137,8 @@ class SkinCode extends defaultStyle { standardLength: 7, // 高柱长度 standardHeight: 6, // 灯柱高度 standardColor: '#fff', // 灯柱颜色 - standardWidth: 3 // 灯柱宽度 + standardWidth: 3, // 灯柱宽度 + autoRouteColor: '#008000' // 自动进路开启灯柱颜色 }, text: { show: true, // 信号机名称显示 diff --git a/src/jmapNew/shape/Signal/index.js b/src/jmapNew/shape/Signal/index.js index 1e523f70d..cf4867ea9 100644 --- a/src/jmapNew/shape/Signal/index.js +++ b/src/jmapNew/shape/Signal/index.js @@ -88,7 +88,7 @@ class Signal extends Group { z: this.z - 1, shape: { x: signalRect.x - style.Signal.sigBack.distanceX, - y: signalRect.y - style.Signal.sigBack.distanceY, + y: signalRect.y + style.Signal.sigBack.distanceY, width: signalRect.width + 2 * style.Signal.sigBack.distanceX, height: signalRect.height - 2 * style.Signal.sigBack.distanceY }, @@ -97,6 +97,8 @@ class Signal extends Group { fill: style.Signal.sigBack.color } }); + this.add(this.sigBack); + this.sigBack.hide(); } // 信号机名称 const sigNameX = model.position.x + model.positionPoint.x - drict * (style.Signal.post.standardWidth) + model.namePosition.x; @@ -311,6 +313,15 @@ class Signal extends Group { this.sigName.setStyle({ textBorderWidth: 1 }); this.sigName.setColor('#fff'); } + // if (this.style.Signal.sigBack) { + // this.sigBack.show(); + // this.sigBack.animateStyle(true) + // .when(0, { fill: this.style.backgroundColor }) + // .when(1000, { fill: this.style.Signal.sigBack.color }) + // .when(2000, { fill: this.style.backgroundColor }) + // .when(3000, { fill: this.style.Signal.sigBack.color }) + // .start(); + // } } // 功能封锁 @@ -366,6 +377,9 @@ class Signal extends Group { this.sigName.setColor(this.style.Signal.text.AutoRouteColor); this.setAutoClose(); } + if (this.style.Signal.post.autoRouteColor) { + this.sigPost.setColor(this.style.Signal.post.autoRouteColor); + } } // 信号机进路自动触发模式状态类型