大铁线路 列车 车次号显示 调整
This commit is contained in:
parent
6e9ca25459
commit
81cdaafa58
@ -786,7 +786,7 @@ class SkinCode extends defaultStyle {
|
||||
trainBody: {
|
||||
fontFamily: 'consolas',
|
||||
trainBodyLineWidth: 1, // 车身line宽
|
||||
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||
changeTrainWidth: true, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||
specialTrainType: [
|
||||
{
|
||||
type: '03',
|
||||
@ -841,8 +841,9 @@ class SkinCode extends defaultStyle {
|
||||
trainServerOffset: { x: 4, y: 4} // 列车服务号偏移
|
||||
},
|
||||
trainTarget: {
|
||||
tripNumberPrefix: '000', // 车次号前缀
|
||||
defaultTripNumber: 'DDD', // 默认车次号2
|
||||
tripNumberPrefix: '', // 车次号前缀
|
||||
// defaultTripNumber: 'DDD', // 默认车次号2
|
||||
defaultTripNumber: ' ', // 默认车次号
|
||||
trainTargetOffset: { x: 36, y: 4}, // 列车车次号偏移
|
||||
trainTargetTextAlign: 'right' // 车次号文字显示位置
|
||||
},
|
||||
|
@ -68,13 +68,14 @@ export default class TrainBody extends Group {
|
||||
z: this.model.z + 1,
|
||||
x: parseInt(model.point.x + model.style.Train.trainTarget.trainTargetOffset.x),
|
||||
y: parseInt(model.point.y + model.style.Train.trainTarget.trainTargetOffset.y),
|
||||
text: tripNumber.substring(tripNumber.length - style.Train.trainTarget.tripNumberPrefix.length),
|
||||
text: tripNumber.substring(tripNumber.length - (style.Train.trainTarget.tripNumberPrefix.length || tripNumber.length)),
|
||||
textFill: model.style.Train.trainTarget.fontColor || style.trainTextColor,
|
||||
fontSize: model.style.Train.trainTarget.fontSize || model.fontSize,
|
||||
fontFamily: style.Train.common.fontFamily,
|
||||
textAlign: 'left',
|
||||
textVerticalAlign: 'top'
|
||||
});
|
||||
// console.log(model.fontSize, tripNumber.length - (style.Train.trainTarget.tripNumberPrefix.length || tripNumber.length), tripNumber, tripNumber.length - style.Train.trainTarget.tripNumberPrefix.length || tripNumber.length);
|
||||
this.textTrainTarget = new ETextName({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 1,
|
||||
|
Loading…
Reference in New Issue
Block a user