西安一三按计划折返
This commit is contained in:
parent
a5f56bae2d
commit
06b9fda264
@ -323,11 +323,16 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
turnBack: { // 按图折返
|
||||
lamp: 1, // 灯数量
|
||||
lampSpace: 60 // 灯间距
|
||||
lampSpace: 60, // 灯间距
|
||||
textName: '按计划执行',
|
||||
showLampBorder: true,
|
||||
topText: true,
|
||||
toptextDistance: 14,
|
||||
lineDash: [0]
|
||||
},
|
||||
StationControl:{
|
||||
text: {
|
||||
distance: 2, // 灯和文字之间的距离
|
||||
distance: 3, // 灯和文字之间的距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontFormat: 'consolas', // 字体格式
|
||||
fontColor: '#ffffff', // 字体颜色
|
||||
|
@ -112,6 +112,25 @@ export default class Station extends Group {
|
||||
const style = this.style;
|
||||
if (model.visible && model.createTurnBack) {
|
||||
this.turnBacks = [];
|
||||
if (style.Station.turnBack.topText) {
|
||||
this.turnBackTopText = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: model.turnBackPoint.x,
|
||||
y: model.turnBackPoint.y - style.Station.lamp.radiusR - style.Station.turnBack.toptextDistance,
|
||||
fontWeight: style.Station.text.fontWeight,
|
||||
fontSize: style.Station.text.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name + '站后折返',
|
||||
textFill: '#fff',
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
}
|
||||
});
|
||||
this.add(this.turnBackTopText);
|
||||
}
|
||||
for (let index = 0; index < style.Station.turnBack.lamp; index++) {
|
||||
const turnBack = new EControl({
|
||||
zlevel: this.zlevel,
|
||||
@ -123,6 +142,7 @@ export default class Station extends Group {
|
||||
r: style.Station.lamp.radiusR
|
||||
},
|
||||
lineWidth: 0,
|
||||
lineDash: style.Station.turnBack.lineDash,
|
||||
fill: style.Station.lamp.controlColor
|
||||
},
|
||||
text: {
|
||||
@ -132,7 +152,7 @@ export default class Station extends Group {
|
||||
fontWeight: style.Station.text.fontWeight,
|
||||
fontSize: style.Station.text.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: '按图折返',
|
||||
text: style.Station.turnBack.textName || '按图折返',
|
||||
textFill: '#fff',
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
@ -141,7 +161,10 @@ export default class Station extends Group {
|
||||
});
|
||||
this.turnBacks.push(turnBack);
|
||||
}
|
||||
this.turnBacks.forEach(lamp => { this.add(lamp); });
|
||||
this.turnBacks.forEach(lamp => {
|
||||
lamp.setArcBorder(style.Station.turnBack.showLampBorder);
|
||||
this.add(lamp);
|
||||
});
|
||||
}
|
||||
}
|
||||
// 创建控制模式
|
||||
|
@ -56,9 +56,14 @@ export default class EControl extends Group {
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
silent: true,
|
||||
shape: arcRect,
|
||||
shape: {
|
||||
x: arcRect.x - 2,
|
||||
y: arcRect.y - 2,
|
||||
width: arcRect.width + 4,
|
||||
height: arcRect.height + 4
|
||||
},
|
||||
style: {
|
||||
lineDash: this.style.arcBorderStyle.lineDash,
|
||||
lineDash: this.arcStyle.lineDash || this.style.arcBorderStyle.lineDash,
|
||||
stroke: this.style.arcBorderStyle.stroke,
|
||||
fill: this.style.arcBorderStyle.fill
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user