调整南京二实训调整&南二虚拟信号机显示调整

This commit is contained in:
fan 2021-11-22 16:02:54 +08:00
parent 5412bb8ff0
commit b4107c89de
4 changed files with 38 additions and 24 deletions

View File

@ -172,6 +172,9 @@ class SkinCode extends defaultStyle {
whiteColor: '#FFFFFF', // 信号灯白色 whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#000080' // 信号灯蓝色 blueColor: '#000080' // 信号灯蓝色
}, },
virtual: { // 虚拟信号机
lamp: 'triangle' // 灯型 三角形
},
route: { route: {
direction: false, // 自动进路方向 direction: false, // 自动进路方向
offset: { x: -4, y: 0 }, // 自动进路偏移量 offset: { x: -4, y: 0 }, // 自动进路偏移量

View File

@ -225,6 +225,15 @@ class SkinCode extends defaultStyle {
whiteColor: '#FFFFFF', // 信号灯白色 whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#0010FF' // 信号灯蓝色 blueColor: '#0010FF' // 信号灯蓝色
}, },
virtual: { // 虚拟信号机
bg: { // 虚拟信号机背景
fillColor:'#FFFFFF', // 信号背景颜色
strokecolor:'#FFFFFF', // 信号描边颜色
lineWidth: 1, // 信号背景描边宽度
distanceX: 2, // 信号背景x偏移距离
distanceY: 0 // 信号背景Y偏移距离
}
},
route: { route: {
direction: false, // 自动进路方向 direction: false, // 自动进路方向
offset: { x: -4, y: 0 }, // 自动进路偏移量 offset: { x: -4, y: 0 }, // 自动进路偏移量

View File

@ -319,7 +319,8 @@ class Signal extends Group {
}); });
this.add(this.insideTriangle); 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(); const signalRect = this.sigPost.getBoundingRect().clone();
this.lamps.forEach(elem => { this.lamps.forEach(elem => {
signalRect.union(elem.getBoundingRect().clone()); signalRect.union(elem.getBoundingRect().clone());
@ -332,15 +333,15 @@ class Signal extends Group {
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z - 1, z: this.z - 1,
shape: { shape: {
x: signalRect.x - style.Signal.sigBack.distanceX, x: signalRect.x - bgObj.distanceX,
y: signalRect.y + style.Signal.sigBack.distanceY, y: signalRect.y + bgObj.distanceY,
width: signalRect.width + 2 * style.Signal.sigBack.distanceX, width: signalRect.width + 2 * bgObj.distanceX,
height: signalRect.height - 2 * style.Signal.sigBack.distanceY height: signalRect.height - 2 * bgObj.distanceY
}, },
style: { style: {
lineWidth: style.Signal.sigBack.lineWidth, lineWidth: bgObj.lineWidth,
fill: style.Signal.sigBack.fillColor, fill: bgObj.fillColor,
stroke: style.Signal.sigBack.strokecolor stroke: bgObj.strokecolor
} }
}); });
this.add(this.sigBack); this.add(this.sigBack);
@ -465,7 +466,7 @@ class Signal extends Group {
this.add(this.sigDelay); this.add(this.sigDelay);
this.add(this.remainTimeName); 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({ this.virtualSignal = new EVirtualSignal({
zlevel: this.zlevel, zlevel: this.zlevel,
@ -1119,6 +1120,7 @@ class Signal extends Group {
this.tText && this.tText.setStyle('text', model.guideTime); this.tText && this.tText.setStyle('text', model.guideTime);
this.tText && this.tText.show(); this.tText && this.tText.show();
} }
this.model.virtual && this.sigBack && this.sigBack.show();
// 设置灰显 // 设置灰显
if (model.noStatus) { if (model.noStatus) {
this.setAshShow(); this.setAshShow();

View File

@ -2132,49 +2132,49 @@ export const OperationEvent = {
turnBackDTO: { turnBackDTO: {
menuButton: { menuButton: {
operation: '417', operation: '417',
domId: '_Tips-Section-turn-Back-DTO-menu-Button' domId: '_Tips-Section-turn-Back-DTO-menu-Button{BOTTOM}'
} }
}, },
// 取消折返 // 取消折返
CancelTurnBack: { CancelTurnBack: {
menuButton: { menuButton: {
operation: '418', operation: '418',
domId: '_Tips-Section-Cancel-Turn-Back-menu-Button' domId: '_Tips-Section-Cancel-Turn-Back-menu-Button{BOTTOM}'
} }
}, },
// 自动折返 // 自动折返
AutoTurnBack: { AutoTurnBack: {
menuButton: { menuButton: {
operation: '419', operation: '419',
domId: '_Tips-Section-Auto-Turn-Back-menu-Button' domId: '_Tips-Section-Auto-Turn-Back-menu-Button{BOTTOM}'
} }
}, },
// 换上至下 // 换上至下
PutUpTheDown: { PutUpTheDown: {
menuButton: { menuButton: {
operation: '420', operation: '420',
domId: '_Tips-Section-Put-Up-The-Down-menu-Button' domId: '_Tips-Section-Put-Up-The-Down-menu-Button{BOTTOM}'
} }
}, },
// 换下至上 // 换下至上
PutDownTheUp: { PutDownTheUp: {
menuButton: { menuButton: {
operation: '421', operation: '421',
domId: '_Tips-Section-Put-Down-The-Up-menu-Button' domId: '_Tips-Section-Put-Down-The-Up-menu-Button{BOTTOM}'
} }
}, },
// 上行终止站停 // 上行终止站停
PutUpStop: { PutUpStop: {
menuButton: { menuButton: {
operation: '422', operation: '422',
domId: '_Tips-Section-Put-Up-Stop-menu-Button' domId: '_Tips-Section-Put-Up-Stop-menu-Button{BOTTOM}'
} }
}, },
// 下行终止站停 // 下行终止站停
PutDownStop: { PutDownStop: {
menuButton: { menuButton: {
operation: '423', 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 自动折返 // (南京二号线) 01 不折返 02 缺省折返 03 换端 04 自动折返
menuBtnUp01: { menuBtnUp01: {
operation: '4241', operation: '4241',
domId: '_Tips-Section-set-Back-Strategy-Up-menu-01' domId: '_Tips-Section-set-Back-Strategy-Up-menu-01{BOTTOM}'
}, },
menuBtnDown01: { menuBtnDown01: {
operation: '4242', operation: '4242',
domId: '_Tips-Section-set-Back-Strategy-Down-menu-01' domId: '_Tips-Section-set-Back-Strategy-Down-menu-01{BOTTOM}'
}, },
menuBtnUp02: { menuBtnUp02: {
operation: '4243', operation: '4243',
domId: '_Tips-Section-set-Back-Strategy-Up-menu-02' domId: '_Tips-Section-set-Back-Strategy-Up-menu-02{BOTTOM}'
}, },
menuBtnDown02: { menuBtnDown02: {
operation: '4244', operation: '4244',
domId: '_Tips-Section-set-Back-Strategy-Down-menu-02' domId: '_Tips-Section-set-Back-Strategy-Down-menu-02{BOTTOM}'
}, },
menuBtnUp03: { menuBtnUp03: {
operation: '4245', operation: '4245',
domId: '_Tips-Section-set-Back-Strategy-Up-menu-03' domId: '_Tips-Section-set-Back-Strategy-Up-menu-03{BOTTOM}'
}, },
menuBtnDown03: { menuBtnDown03: {
operation: '4246', operation: '4246',
domId: '_Tips-Section-set-Back-Strategy-Down-menu-03' domId: '_Tips-Section-set-Back-Strategy-Down-menu-03{BOTTOM}'
}, },
menuBtnUp04: { menuBtnUp04: {
operation: '4247', operation: '4247',
domId: '_Tips-Section-set-Back-Strategy-Up-menu-04' domId: '_Tips-Section-set-Back-Strategy-Up-menu-04{BOTTOM}'
}, },
menuBtnDown04: { menuBtnDown04: {
operation: '4248', operation: '4248',
domId: '_Tips-Section-set-Back-Strategy-Down-menu-04' domId: '_Tips-Section-set-Back-Strategy-Down-menu-04{BOTTOM}'
} }
}, },
// (南京二号线) 站台轨提前发车 // (南京二号线) 站台轨提前发车