南京二号线皮肤调整
This commit is contained in:
parent
0594529577
commit
2ddc94f7aa
@ -133,7 +133,8 @@ class SkinCode extends defaultStyle {
|
||||
standardLength: 6, // 高柱长度
|
||||
standardHeight: 6, // 灯柱高度
|
||||
standardColor: '#5578B6', // 灯灯柱颜色
|
||||
standardWidth: 1.5 // 灯柱宽度
|
||||
standardVerticalWidth: 1.5, // 灯柱竖杆宽度
|
||||
standardRailWidth: 1.5 // 灯柱横杆宽度
|
||||
},
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
|
@ -141,7 +141,8 @@ class SkinCode extends defaultStyle {
|
||||
standardLength: 6, // 高柱长度
|
||||
standardHeight: 6, // 灯柱高度
|
||||
standardColor: '#C0C0C0', // 灯柱颜色
|
||||
standardWidth: 2 // 灯柱宽度
|
||||
standardVerticalWidth: 2, // 灯柱竖杆宽度
|
||||
standardRailWidth: 2 // 灯柱横杆宽度
|
||||
},
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
|
@ -147,7 +147,8 @@ class SkinCode extends defaultStyle {
|
||||
standardLength: 6, // 高柱长度
|
||||
standardHeight: 6, // 灯柱高度
|
||||
standardColor: '#FFFFFF', // 灯柱颜色
|
||||
standardWidth: 2 // 灯柱宽度
|
||||
standardVerticalWidth: 2, // 灯柱竖杆宽度
|
||||
standardRailWidth: 2 // 灯柱横杆宽度
|
||||
},
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
|
@ -125,7 +125,8 @@ class SkinCode extends defaultStyle {
|
||||
standardLength: 6, // 高柱长度
|
||||
standardHeight: 6, // 灯柱高度
|
||||
standardColor: '#3149C3', // 灯珠颜色
|
||||
standardWidth: 2 // 灯珠宽度
|
||||
standardVerticalWidth: 2, // 灯柱竖杆宽度
|
||||
standardRailWidth: 2 // 灯柱横杆宽度
|
||||
},
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
|
@ -125,7 +125,8 @@ class SkinCode extends defaultStyle {
|
||||
standardLength: 6, // 高柱长度
|
||||
standardHeight: 6, // 灯柱高度
|
||||
standardColor: '#3149C3', // 灯珠颜色
|
||||
standardWidth: 2 // 灯珠宽度
|
||||
standardVerticalWidth: 2, // 灯柱竖杆宽度
|
||||
standardRailWidth: 2 // 灯柱横杆宽度
|
||||
},
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
|
@ -148,7 +148,8 @@ class SkinCode extends defaultStyle {
|
||||
standardLength: 4, // 高柱长度
|
||||
standardHeight: 5, // 灯柱高度
|
||||
standardColor: '#FF0000', // 灯柱颜色
|
||||
standardWidth: 4 // 灯柱宽度
|
||||
standardVerticalWidth: 4, // 灯柱竖杆宽度
|
||||
standardRailWidth: 4 // 灯柱横杆宽度
|
||||
},
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
|
@ -145,10 +145,12 @@ class SkinCode extends defaultStyle {
|
||||
distance: 10, // 设备距离区段的距离
|
||||
post: {
|
||||
standardShow: true, // 灯柱显示
|
||||
standardLength: 4, // 高柱长度
|
||||
standardVerticalShape: '8', // 灯柱 竖杆 8边型
|
||||
standardLength: 12, // 高柱长度
|
||||
standardHeight: 5, // 灯柱高度
|
||||
standardColor: '#FF0000', // 灯柱颜色
|
||||
standardWidth: 4 // 灯柱宽度
|
||||
standardVerticalWidth: 1, // 灯柱竖杆宽度
|
||||
standardRailWidth: 6 // 灯柱横杆宽度
|
||||
},
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
|
@ -128,7 +128,8 @@ class SkinCode extends defaultStyle {
|
||||
standardLength: 6, // 高柱长度
|
||||
standardHeight: 6, // 灯柱高度
|
||||
standardColor: '#C0C0C0', // 灯柱颜色
|
||||
standardWidth: 2 // 灯柱宽度
|
||||
standardVerticalWidth: 2, // 灯柱竖杆宽度
|
||||
standardRailWidth: 2 // 灯柱横杆宽度
|
||||
},
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
|
@ -164,7 +164,8 @@ class SkinCode extends defaultStyle {
|
||||
standardHeight: 6, // 灯柱高度
|
||||
standardColor: '#000000', // 灯柱颜色
|
||||
physicColor:'#c0c0c0', // 物理点灯灯柱颜色
|
||||
standardWidth: 2 // 灯柱宽度
|
||||
standardVerticalWidth: 2, // 灯柱竖杆宽度
|
||||
standardRailWidth: 2 // 灯柱横杆宽度
|
||||
},
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
|
@ -150,7 +150,8 @@ class SkinCode extends defaultStyle {
|
||||
standardLength: 6, // 高柱长度
|
||||
standardHeight: 6, // 灯柱高度
|
||||
standardColor: '#969696', // 灯灯柱颜色
|
||||
standardWidth: 3 // 灯柱宽度
|
||||
standardVerticalWidth: 3, // 灯柱竖杆宽度
|
||||
standardRailWidth: 3 // 灯柱横杆宽度
|
||||
},
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
|
@ -133,7 +133,8 @@ class SkinCode extends defaultStyle {
|
||||
standardLength: 6, // 高柱长度
|
||||
standardHeight: 6, // 灯柱高度
|
||||
standardColor: '#3149C3', // 灯珠颜色
|
||||
standardWidth: 2 // 灯珠宽度
|
||||
standardVerticalWidth: 2, // 灯柱竖杆宽度
|
||||
standardRailWidth: 2 // 灯柱横杆宽度
|
||||
},
|
||||
text: {
|
||||
show: true, // 信号机名称显示
|
||||
|
@ -142,7 +142,8 @@ class SkinCode extends defaultStyle {
|
||||
standardLength: 7, // 高柱长度
|
||||
standardHeight: 6, // 灯柱高度
|
||||
standardColor: '#fff', // 灯柱颜色
|
||||
standardWidth: 2, // 灯柱宽度
|
||||
standardVerticalWidth: 2, // 灯柱竖杆宽度
|
||||
standardRailWidth: 2, // 灯柱横杆宽度
|
||||
autoRouteColor: '#008000', // 自动进路开启灯柱颜色
|
||||
shapeChange: true, // 灯柱形状改变
|
||||
terminalOptional: '#CC3399' // 终端可选信号机灯柱颜色
|
||||
|
@ -12,23 +12,49 @@ class ESigPost extends Group {
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
// 竖杆
|
||||
this.ver = new Polyline({
|
||||
_subType: 'SignalLamp',
|
||||
_val: '3',
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
points: [
|
||||
[model.x, model.y + style.Signal.post.standardHeight * 1.2],
|
||||
[model.x, model.y - style.Signal.post.standardHeight * 1.2]
|
||||
]
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Signal.post.standardWidth,
|
||||
stroke: style.Signal.post.standardColor
|
||||
}
|
||||
});
|
||||
// 基座
|
||||
let verPoints = [[model.x, model.y + style.Signal.post.standardHeight * 1.2], [model.x, model.y - style.Signal.post.standardHeight * 1.2]];
|
||||
if (style.Signal.post.standardVerticalShape && style.Signal.post.standardVerticalShape === '8') {
|
||||
verPoints = [
|
||||
[model.x - model.drict * 2, model.y + style.Signal.post.standardHeight * 1.2],
|
||||
[model.x - model.drict * 2, model.y - style.Signal.post.standardHeight * 1.2],
|
||||
[model.x, model.y - style.Signal.post.standardHeight * 1.2],
|
||||
[model.x, model.y - style.Signal.post.standardRailWidth / 2],
|
||||
[model.x + model.drict * 2, model.y - style.Signal.post.standardRailWidth / 2],
|
||||
[model.x + model.drict * 2, model.y + style.Signal.post.standardRailWidth / 2],
|
||||
[model.x, model.y + style.Signal.post.standardRailWidth / 2],
|
||||
[model.x, model.y + style.Signal.post.standardHeight * 1.2]
|
||||
];
|
||||
this.ver = new Polygon({
|
||||
_subType: 'SignalLamp',
|
||||
_val: '3',
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
points: verPoints
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Signal.post.standardVerticalWidth,
|
||||
stroke: style.Signal.post.standardColor,
|
||||
fill: style.Signal.post.standardColor
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.ver = new Polyline({
|
||||
_subType: 'SignalLamp',
|
||||
_val: '3',
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
points: verPoints
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Signal.post.standardVerticalWidth,
|
||||
stroke: style.Signal.post.standardColor,
|
||||
fill: style.Signal.post.standardColor
|
||||
}
|
||||
});
|
||||
}
|
||||
// 横杆
|
||||
this.hor = new Polyline({
|
||||
zlevel: model.zlevel,
|
||||
@ -41,18 +67,13 @@ class ESigPost extends Group {
|
||||
]
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Signal.post.standardWidth,
|
||||
lineWidth: style.Signal.post.standardRailWidth,
|
||||
stroke: style.Signal.post.standardColor
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.ver);
|
||||
this.add(this.hor);
|
||||
|
||||
model.type === '01' ? this.hor.hide() : this.hor.show();
|
||||
if (style.Signal.post.standardShow) {
|
||||
this.hor.show();
|
||||
}
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
@ -100,7 +121,7 @@ class ESigPost extends Group {
|
||||
if (style.Signal.post.standardShow) {
|
||||
type = '01';
|
||||
}
|
||||
const length = style.Signal.post.standardShow ? 4 : 0;
|
||||
const length = style.Signal.post.standardShow ? style.Signal.post.standardLength : 0;
|
||||
if (type === '01') {
|
||||
return {
|
||||
x: model.x + model.drict * style.Signal.lamp.radiusR * 3 / 2 + model.drict * length,
|
||||
|
@ -180,7 +180,7 @@ class Signal extends Group {
|
||||
this.sigBack.hide();
|
||||
}
|
||||
// 信号机名称
|
||||
const sigNameX = model.position.x + model.positionPoint.x - drict * (style.Signal.post.standardWidth) + model.namePosition.x;
|
||||
const sigNameX = model.position.x + model.positionPoint.x - drict * (style.Signal.post.standardVerticalWidth) + model.namePosition.x;
|
||||
const sigNameY = model.position.y + model.positionPoint.y + posit * (style.Signal.distance + style.Section.line.width + style.Signal.lamp.radiusR * 2 + model.namePosition.y + style.Signal.text.distance);
|
||||
const textAlign = style.Signal.text.isAlignCenter ? 'middle' : this.model.right ? 'left' : 'right';
|
||||
const textVerticalAlign = posit == 1 ? 'top' : 'bottom';
|
||||
@ -725,7 +725,7 @@ class Signal extends Group {
|
||||
const rect = this.sigPost.getBoundingRect().clone();
|
||||
|
||||
return {
|
||||
x: rect.x + drict * this.style.Signal.post.standardWidth,
|
||||
x: rect.x + drict * this.style.Signal.post.standardVerticalWidth,
|
||||
y: rect.y - offsetY
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user