diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index 19646e185..bad02de60 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -172,6 +172,9 @@ class SkinCode extends defaultStyle { whiteColor: '#FFFFFF', // 信号灯白色 blueColor: '#000080' // 信号灯蓝色 }, + virtual: { // 虚拟信号机 + lamp: 'triangle' // 灯型 三角形 + }, route: { direction: false, // 自动进路方向 offset: { x: -4, y: 0 }, // 自动进路偏移量 diff --git a/src/jmapNew/config/skinCode/nanjing_02.js b/src/jmapNew/config/skinCode/nanjing_02.js index 36130b90a..1059b6890 100644 --- a/src/jmapNew/config/skinCode/nanjing_02.js +++ b/src/jmapNew/config/skinCode/nanjing_02.js @@ -225,6 +225,15 @@ class SkinCode extends defaultStyle { whiteColor: '#FFFFFF', // 信号灯白色 blueColor: '#0010FF' // 信号灯蓝色 }, + virtual: { // 虚拟信号机 + bg: { // 虚拟信号机背景 + fillColor:'#FFFFFF', // 信号背景颜色 + strokecolor:'#FFFFFF', // 信号描边颜色 + lineWidth: 1, // 信号背景描边宽度 + distanceX: 2, // 信号背景x偏移距离 + distanceY: 0 // 信号背景Y偏移距离 + } + }, route: { direction: false, // 自动进路方向 offset: { x: -4, y: 0 }, // 自动进路偏移量 diff --git a/src/jmapNew/shape/graph/Signal/index.js b/src/jmapNew/shape/graph/Signal/index.js index 535509182..85171c4a2 100644 --- a/src/jmapNew/shape/graph/Signal/index.js +++ b/src/jmapNew/shape/graph/Signal/index.js @@ -319,7 +319,8 @@ class Signal extends Group { }); this.add(this.insideTriangle); } - if (style.Signal.sigBack) { + if (style.Signal.sigBack || (style.Signal.virtual.bg && model.virtual)) { + const bgObj = style.Signal.sigBack || style.Signal.virtual.bg; const signalRect = this.sigPost.getBoundingRect().clone(); this.lamps.forEach(elem => { signalRect.union(elem.getBoundingRect().clone()); @@ -332,15 +333,15 @@ class Signal extends Group { zlevel: this.zlevel, z: this.z - 1, shape: { - x: signalRect.x - style.Signal.sigBack.distanceX, - y: signalRect.y + style.Signal.sigBack.distanceY, - width: signalRect.width + 2 * style.Signal.sigBack.distanceX, - height: signalRect.height - 2 * style.Signal.sigBack.distanceY + x: signalRect.x - bgObj.distanceX, + y: signalRect.y + bgObj.distanceY, + width: signalRect.width + 2 * bgObj.distanceX, + height: signalRect.height - 2 * bgObj.distanceY }, style: { - lineWidth: style.Signal.sigBack.lineWidth, - fill: style.Signal.sigBack.fillColor, - stroke: style.Signal.sigBack.strokecolor + lineWidth: bgObj.lineWidth, + fill: bgObj.fillColor, + stroke: bgObj.strokecolor } }); this.add(this.sigBack); @@ -465,7 +466,7 @@ class Signal extends Group { this.add(this.sigDelay); this.add(this.remainTimeName); - if (this.model.virtual) { + if (this.model.virtual && this.style.Signal.virtual && this.style.Signal.virtual.lamp === 'triangle') { // 虚拟信号机显示 this.virtualSignal = new EVirtualSignal({ zlevel: this.zlevel, @@ -1119,6 +1120,7 @@ class Signal extends Group { this.tText && this.tText.setStyle('text', model.guideTime); this.tText && this.tText.show(); } + this.model.virtual && this.sigBack && this.sigBack.show(); // 设置灰显 if (model.noStatus) { this.setAshShow(); diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index 45d21d38c..b7fac8c70 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -2132,49 +2132,49 @@ export const OperationEvent = { turnBackDTO: { menuButton: { operation: '417', - domId: '_Tips-Section-turn-Back-DTO-menu-Button' + domId: '_Tips-Section-turn-Back-DTO-menu-Button{BOTTOM}' } }, // 取消折返 CancelTurnBack: { menuButton: { operation: '418', - domId: '_Tips-Section-Cancel-Turn-Back-menu-Button' + domId: '_Tips-Section-Cancel-Turn-Back-menu-Button{BOTTOM}' } }, // 自动折返 AutoTurnBack: { menuButton: { operation: '419', - domId: '_Tips-Section-Auto-Turn-Back-menu-Button' + domId: '_Tips-Section-Auto-Turn-Back-menu-Button{BOTTOM}' } }, // 换上至下 PutUpTheDown: { menuButton: { operation: '420', - domId: '_Tips-Section-Put-Up-The-Down-menu-Button' + domId: '_Tips-Section-Put-Up-The-Down-menu-Button{BOTTOM}' } }, // 换下至上 PutDownTheUp: { menuButton: { operation: '421', - domId: '_Tips-Section-Put-Down-The-Up-menu-Button' + domId: '_Tips-Section-Put-Down-The-Up-menu-Button{BOTTOM}' } }, // 上行终止站停 PutUpStop: { menuButton: { operation: '422', - domId: '_Tips-Section-Put-Up-Stop-menu-Button' + domId: '_Tips-Section-Put-Up-Stop-menu-Button{BOTTOM}' } }, // 下行终止站停 PutDownStop: { menuButton: { operation: '423', - domId: '_Tips-Section-Put-Down-Stop-menu-Button' + domId: '_Tips-Section-Put-Down-Stop-menu-Button{BOTTOM}' } }, // 设置折返策略 @@ -2182,35 +2182,35 @@ export const OperationEvent = { // (南京二号线) 01 不折返 02 缺省折返 03 换端 04 自动折返 menuBtnUp01: { operation: '4241', - domId: '_Tips-Section-set-Back-Strategy-Up-menu-01' + domId: '_Tips-Section-set-Back-Strategy-Up-menu-01{BOTTOM}' }, menuBtnDown01: { operation: '4242', - domId: '_Tips-Section-set-Back-Strategy-Down-menu-01' + domId: '_Tips-Section-set-Back-Strategy-Down-menu-01{BOTTOM}' }, menuBtnUp02: { operation: '4243', - domId: '_Tips-Section-set-Back-Strategy-Up-menu-02' + domId: '_Tips-Section-set-Back-Strategy-Up-menu-02{BOTTOM}' }, menuBtnDown02: { operation: '4244', - domId: '_Tips-Section-set-Back-Strategy-Down-menu-02' + domId: '_Tips-Section-set-Back-Strategy-Down-menu-02{BOTTOM}' }, menuBtnUp03: { operation: '4245', - domId: '_Tips-Section-set-Back-Strategy-Up-menu-03' + domId: '_Tips-Section-set-Back-Strategy-Up-menu-03{BOTTOM}' }, menuBtnDown03: { operation: '4246', - domId: '_Tips-Section-set-Back-Strategy-Down-menu-03' + domId: '_Tips-Section-set-Back-Strategy-Down-menu-03{BOTTOM}' }, menuBtnUp04: { operation: '4247', - domId: '_Tips-Section-set-Back-Strategy-Up-menu-04' + domId: '_Tips-Section-set-Back-Strategy-Up-menu-04{BOTTOM}' }, menuBtnDown04: { operation: '4248', - domId: '_Tips-Section-set-Back-Strategy-Down-menu-04' + domId: '_Tips-Section-set-Back-Strategy-Down-menu-04{BOTTOM}' } }, // (南京二号线) 站台轨提前发车