调整南京二实训调整&南二虚拟信号机显示调整
This commit is contained in:
parent
5412bb8ff0
commit
b4107c89de
@ -172,6 +172,9 @@ class SkinCode extends defaultStyle {
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#000080' // 信号灯蓝色
|
||||
},
|
||||
virtual: { // 虚拟信号机
|
||||
lamp: 'triangle' // 灯型 三角形
|
||||
},
|
||||
route: {
|
||||
direction: false, // 自动进路方向
|
||||
offset: { x: -4, y: 0 }, // 自动进路偏移量
|
||||
|
@ -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 }, // 自动进路偏移量
|
||||
|
@ -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();
|
||||
|
@ -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}'
|
||||
}
|
||||
},
|
||||
// (南京二号线) 站台轨提前发车
|
||||
|
Loading…
Reference in New Issue
Block a user