调整 打铁 道岔状态皮肤配置
This commit is contained in:
parent
68cad1616a
commit
693938a367
@ -458,17 +458,23 @@ class SkinCode extends defaultStyle {
|
||||
inversionColor: '#FFFF00', // 道岔反位颜色
|
||||
monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
||||
monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
|
||||
faultFlashing: true // 故障闪烁
|
||||
faultFlashing: false // 故障闪烁
|
||||
},
|
||||
sectionAction: {
|
||||
flag: false, // 道岔 关联区段显示
|
||||
spareColor: '#5b5b5b' // 区段显示颜色
|
||||
},
|
||||
core: {
|
||||
length: 6 // 道岔单边长度
|
||||
length: 6, // 道岔单边长度
|
||||
graphShow: true, // 图形显示
|
||||
graphInversionColor: '#FFFF00', // 反位颜色
|
||||
graphLocalColor: '#00FF00' // 定位颜色
|
||||
},
|
||||
jointImg: { // 道岔 A B C D四元素属性配置
|
||||
trapezoidLength: 8 // 直角梯形元素默认长度
|
||||
trapezoidLength: 8, // 直角梯形元素默认长度
|
||||
faultStatus: true, // 挤岔表示
|
||||
fork: true, // 挤岔专用(如有挤岔操作 变为true)
|
||||
forKColor: 'red' // 挤岔颜色 配合挤岔专用
|
||||
},
|
||||
arcBlcok: { // 圆形封锁图形
|
||||
show: false, // 显示
|
||||
@ -479,10 +485,17 @@ class SkinCode extends defaultStyle {
|
||||
rectLock: { // 矩形封锁框图形
|
||||
rectWidth: 18, // 矩形框 宽高
|
||||
rectBorderColor: '#fff', // 矩形边框颜色
|
||||
monolock: true, // 单锁显示
|
||||
block: true, // 封锁显示
|
||||
blockColor: 'red' // 封锁颜色
|
||||
}
|
||||
blockColor: 'red', // 封锁颜色
|
||||
followName: true, // 位置跟随名称确定
|
||||
},
|
||||
arcBlcok: { // 圆形封锁图形
|
||||
show: true, // 显示
|
||||
shapeR: 10,
|
||||
arcBorderColor: 'red', // 默认边框颜色
|
||||
locationColor: 'red', // 定位封锁颜色
|
||||
inversionColor: 'red' // 反位封锁颜色
|
||||
},
|
||||
};
|
||||
|
||||
this[deviceType.LcControl] = {
|
||||
|
@ -470,7 +470,9 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
core: {
|
||||
length: 6, // 道岔单边长度
|
||||
graphShow: true // 图形显示
|
||||
graphShow: true, // 图形显示
|
||||
graphInversionColor: '#FFFF00', // 反位颜色
|
||||
graphLocalColor: '#00FF00' // 定位颜色
|
||||
},
|
||||
jointImg: { // 道岔 A B C D四元素属性配置
|
||||
trapezoidLength: 8, // 直角梯形元素默认长度
|
||||
|
@ -527,8 +527,10 @@ class SkinCode extends defaultStyle {
|
||||
spareColor: '#5b5b5b' // 区段显示颜色
|
||||
},
|
||||
core: {
|
||||
length: 6, // 道岔单边长度
|
||||
graphShow: true // 图形显示
|
||||
length: 6, // 道岔单边长度
|
||||
graphShow: true, // 图形显示
|
||||
graphInversionColor: '#FFFF00', // 反位颜色
|
||||
graphLocalColor: '#00FF00' // 定位颜色
|
||||
},
|
||||
jointImg: { // 道岔 A B C D四元素属性配置
|
||||
trapezoidLength: 8, // 直角梯形元素默认长度
|
||||
@ -537,7 +539,7 @@ class SkinCode extends defaultStyle {
|
||||
forKColor: 'red' // 挤岔颜色 配合挤岔专用
|
||||
},
|
||||
arcBlcok: { // 圆形封锁图形
|
||||
show: true, // 显示
|
||||
show: true, // 显示
|
||||
shapeR: 15,
|
||||
arcBorderColor: 'green', // 默认边框颜色
|
||||
locationColor: 'green', // 定位封锁颜色
|
||||
|
@ -230,11 +230,22 @@ export default class Switch extends Group {
|
||||
offsetX = directx * this.style.Switch.rectLock.offset.x;
|
||||
offsetY = directy * this.style.Switch.rectLock.offset.y;
|
||||
}
|
||||
let x = this.model.intersection.x - this.style.Switch.rectLock.rectWidth / 2 + offsetX;
|
||||
let y = this.model.intersection.y - this.style.Switch.rectLock.rectWidth / 2 + offsetY;
|
||||
if (this.style.Switch.rectLock.followName) {
|
||||
const directx = this.triangle.drictx;
|
||||
const rect = this.name.getBoundingRect();
|
||||
const wLen = this.style.Switch.rectLock.rectWidth - (directx > 0? rect.width: rect.width/2);
|
||||
const hLen = this.style.Switch.rectLock.rectWidth - rect.height
|
||||
x = rect.x - wLen/2;
|
||||
y = rect.y - hLen/2
|
||||
}
|
||||
|
||||
this.lockRect = new ELockRect({ // 单锁矩形框
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 6,
|
||||
x: this.model.intersection.x - this.style.Switch.rectLock.rectWidth / 2 + offsetX,
|
||||
y: this.model.intersection.y - this.style.Switch.rectLock.rectWidth / 2 + offsetY,
|
||||
x,
|
||||
y,
|
||||
width: this.style.Switch.rectLock.rectWidth,
|
||||
lineWidth: 1.8,
|
||||
stroke: this.style.Switch.rectLock.rectBorderColor,
|
||||
@ -314,8 +325,9 @@ export default class Switch extends Group {
|
||||
|
||||
/** 恢复状态*/
|
||||
recover() {
|
||||
this.lockRect.hide(); // 矩形包围框
|
||||
this.lockArc.hide(); // 圆形单锁框
|
||||
this.lockRect && this.lockRect.hide(); // 矩形包围框
|
||||
this.lockCircle && this.lockCircle.hide(); // 圆形包围框
|
||||
this.lockArc && this.lockArc.hide(); // 圆形单锁框
|
||||
this.name.getNameText().stopAnimation(false);
|
||||
this.shapeModelC.hide(); // 形状 C
|
||||
this.shapeModelA.hide(); // 形状 A
|
||||
@ -344,7 +356,7 @@ export default class Switch extends Group {
|
||||
}
|
||||
if (this.style.Switch.core.graphShow) { // 佛山线路显示
|
||||
this.shapeModelB.show();
|
||||
this.shapeModelB.setColor('#00FF00');
|
||||
this.shapeModelB.setColor(this.style.Switch.core.graphLocalColor);
|
||||
this.shapeModelC.show();
|
||||
this.shapeModelC.setColor(this.style.backgroundColor);
|
||||
}
|
||||
@ -364,7 +376,7 @@ export default class Switch extends Group {
|
||||
this.shapeModelA.setColor(this.style.Section.line.spareColor);
|
||||
if (this.style.Switch.core.graphShow) { // 佛山线路显示
|
||||
this.shapeModelC.show();
|
||||
this.shapeModelC.setColor('#FFFF00');
|
||||
this.shapeModelC.setColor(this.style.Switch.core.graphInversionColor);
|
||||
this.shapeModelC.attr({
|
||||
z: this.z + 6
|
||||
});
|
||||
@ -474,16 +486,20 @@ export default class Switch extends Group {
|
||||
|
||||
/** 单锁*/
|
||||
setMonolock(normalPosition, reversePosition) {
|
||||
if (this.style.Switch.rectLock.monolock) { // 判断单锁矩形是否显示
|
||||
if (this.style.Switch.rectLock &&
|
||||
this.style.Switch.rectLock.monolock) { // 判断单锁矩形是否显示
|
||||
this.lockRect.show();
|
||||
if (this.style.Switch.rectLock.rectBorderFillColor) { // 西安二号线 专用显示
|
||||
this.lockRect.setStyle({ stroke: this.style.Switch.rectLock.rectBorderColor, fill: this.style.Switch.rectLock.rectBorderFillColor });
|
||||
}
|
||||
}
|
||||
if (this.style.Switch.text.monolock) { // 单锁显示名称包围框
|
||||
|
||||
if (this.style.Switch.text &&
|
||||
this.style.Switch.text.monolock) { // 单锁显示名称包围框
|
||||
this.setHasTextBorder(1);
|
||||
}
|
||||
if (this.style.Switch.arcBlcok.show) { // 圆形单锁是否显示
|
||||
if (this.style.Switch.arcBlcok &&
|
||||
this.style.Switch.arcBlcok.show) { // 圆形单锁是否显示
|
||||
this.lockArc.show();
|
||||
if (normalPosition) {
|
||||
this.lockArc.setStyle({ stroke: this.style.Switch.arcBlcok.locationColor });
|
||||
@ -545,6 +561,7 @@ export default class Switch extends Group {
|
||||
this.lockRect.setStyle({ stroke: this.style.Switch.rectLock.blockColor, fill: this.style.Switch.rectLock.blockFillColor });
|
||||
}
|
||||
}
|
||||
|
||||
// if (this.style.Switch.coverBlock && this.style.Switch.coverBlock.show) {
|
||||
// this.shapeBlockCover.show();
|
||||
// this.shapeBlockCover.setColor(this.style.Switch.coverBlock.coverBlockColor);
|
||||
|
Loading…
Reference in New Issue
Block a user