调整宁波线路引导信号显示
This commit is contained in:
parent
a7baf76513
commit
a89b4d5f1d
@ -161,7 +161,7 @@ class SkinCode extends defaultStyle {
|
||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||
},
|
||||
lamp: {
|
||||
guidName: 'defult', // 默认引导类型
|
||||
guidName: 'ningbo_01', // 默认引导类型
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 2, // 信号灯边框线宽度
|
||||
|
@ -56,13 +56,16 @@ class Signal extends Group {
|
||||
// 信号灯
|
||||
const endPoint = this.sigPost.getLampPosition(model.lampPostType);
|
||||
this.lamps = [];
|
||||
if (style.Signal.lamp.guidName == 'ningbo_01' && this.count == 1) {
|
||||
this.count = 2;
|
||||
}
|
||||
for (let i = 0; i < this.count; i++) {
|
||||
const lamp = new ESigLamp({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
drict: drict,
|
||||
x: endPoint.x + i * drict * style.Signal.lamp.radiusR * 2,
|
||||
x: endPoint.x + i * drict * style.Signal.lamp.radiusR * 2.3,
|
||||
y: endPoint.y,
|
||||
originX: model.position.x,
|
||||
originY: model.position.y
|
||||
@ -359,6 +362,9 @@ class Signal extends Group {
|
||||
|
||||
// 引导
|
||||
guid() {
|
||||
if (this.style.Signal.lamp.guidName == 'ningbo_01' && this.count == 1) {
|
||||
this.lamps[1].show();
|
||||
}
|
||||
if (this.count == 2 && !this.model.lightType && this.style.Signal.lamp.guidName != 'chengdu_03') { // 双灯 物理点灯 允许引导信号
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
@ -474,6 +480,9 @@ class Signal extends Group {
|
||||
if (this.style.Signal.lamp.guidName == 'chengdu_03') {
|
||||
this.lamps[0].setStyle({ lineWidth: this.style.Signal.lamp.borderWidth });
|
||||
}
|
||||
if (this.style.Signal.lamp.guidName == 'ningbo_01' && this.count == 1) {
|
||||
this.lamps[1].hide();
|
||||
}
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
@ -485,23 +494,6 @@ class Signal extends Group {
|
||||
} else if (!model.isRouteActive && isShowThePrdType(model.prdType, '03') && this.style.Signal.lowButton.display) {
|
||||
this.setLowButtonRecover();
|
||||
}
|
||||
|
||||
/** 信号机进路按钮显示 */
|
||||
model.isRouteSignal && this.setLowButtonShow();
|
||||
/** 信号机封锁 */
|
||||
model.blockade && this.block();
|
||||
// 联锁自动进路通过
|
||||
// model.linkageAutoRouteShow = 1;
|
||||
model.fleetMode && this.setAutoRouteOpen();
|
||||
/** 设置点灯类型*/
|
||||
if (model.lightType) {
|
||||
this.logicalLight(); // 设置逻辑点灯
|
||||
} else {
|
||||
this.physicsLight(); // 设置物理点灯
|
||||
}
|
||||
/** 进路交人工控或自动控 */
|
||||
// model.atsControl = 0;
|
||||
!model.atsControl && this.setArtificialRouteClose();
|
||||
/** 设置灯的颜色 */
|
||||
if (model.greenOpen) {
|
||||
if (this.lamps[0]) {
|
||||
@ -525,6 +517,23 @@ class Signal extends Group {
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
}
|
||||
/** 信号机进路按钮显示 */
|
||||
model.isRouteSignal && this.setLowButtonShow();
|
||||
/** 信号机封锁 */
|
||||
model.blockade && this.block();
|
||||
// 联锁自动进路通过
|
||||
// model.linkageAutoRouteShow = 1;
|
||||
model.fleetMode && this.setAutoRouteOpen();
|
||||
/** 设置点灯类型*/
|
||||
if (model.lightType) {
|
||||
this.logicalLight(); // 设置逻辑点灯
|
||||
} else {
|
||||
this.physicsLight(); // 设置物理点灯
|
||||
}
|
||||
model.guid = 1;
|
||||
model.guid && this.guid(); // 引导信号显示
|
||||
/** 进路交人工控或自动控 */
|
||||
!model.atsControl && this.setArtificialRouteClose();
|
||||
}
|
||||
|
||||
getBoundingRect() {
|
||||
|
Loading…
Reference in New Issue
Block a user