Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
97e9c8ca47
@ -282,7 +282,6 @@ class SkinCode extends defaultStyle {
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
offset: { x: -8, y: 13 }, // 扣车偏移量
|
||||
trainColor: '#E4EF50', // 车站扣车颜色
|
||||
centerTrainColor: '#FFFFFF', // 中心扣车颜色
|
||||
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
@ -290,9 +289,9 @@ class SkinCode extends defaultStyle {
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: { x: -8, y: 3 }, // 运行时间偏移量
|
||||
textColor: '#FFFFFF' // 停站时间字体颜色
|
||||
textColor: '#FFFFFF', // 停站时间字体颜色
|
||||
textFontSize: 8
|
||||
},
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
|
@ -231,7 +231,6 @@ class SkinCode extends defaultStyle {
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||
trainColor: 'yellow', // 车站扣车颜色
|
||||
centerTrainColor: 'white', // 中心扣车颜色
|
||||
andCenterTrainColor: 'red', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
@ -239,9 +238,9 @@ class SkinCode extends defaultStyle {
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: {x: -8, y: -4}, // 运行时间偏移量
|
||||
textColor: 'white' // 停站时间字体颜色
|
||||
textColor: 'white', // 停站时间字体颜色
|
||||
textFontSize: 12
|
||||
},
|
||||
jump: {
|
||||
text: '跳', // 停跳显示内容
|
||||
|
@ -237,7 +237,6 @@ class SkinCode extends defaultStyle {
|
||||
detainCar: { // 扣车
|
||||
text: '扣', // 扣车显示内容
|
||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||
trainColor: '#FFFF00', // 车站扣车颜色
|
||||
centerTrainColor: '#C0C0C0', // 中心扣车颜色
|
||||
andCenterTrainColor: '#C0C0C0', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
@ -245,10 +244,9 @@ class SkinCode extends defaultStyle {
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: {x: -8, y: -4}, // 运行时间偏移量
|
||||
textColor: '#C0C0C0', // 停站时间字体颜色
|
||||
textFontSize: 12
|
||||
textFontSize: 10
|
||||
},
|
||||
jump: {
|
||||
text: '跳', // 停跳显示内容
|
||||
|
@ -227,7 +227,6 @@ class SkinCode extends defaultStyle {
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||
trainColor: '#E4EF50', // 车站扣车颜色
|
||||
centerTrainColor: '#FFFFFF', // 中心扣车颜色
|
||||
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
@ -235,10 +234,9 @@ class SkinCode extends defaultStyle {
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: {x: -8, y: -4}, // 运行时间偏移量
|
||||
textColor: '#C0C0C0', // 停站时间字体颜色
|
||||
textFontSize: 12
|
||||
textFontSize: 11
|
||||
},
|
||||
jump: {
|
||||
text: 'S', // 停跳显示内容
|
||||
|
@ -232,7 +232,6 @@ class SkinCode extends defaultStyle {
|
||||
text: 'H', // 扣车显示内容
|
||||
fontSize: 18, // 扣车字体大小
|
||||
offset: { x: 60, y: -20 }, // 扣车偏移量
|
||||
trainColor: '#E4EF50', // 车站扣车颜色
|
||||
centerTrainColor: '#F61107', // 中心扣车颜色
|
||||
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
@ -246,8 +245,6 @@ class SkinCode extends defaultStyle {
|
||||
fontSize: 18
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
offset: { x: -8, y: 26 }, // 运行时间偏移量
|
||||
textColor: '#FFFFFF' // 停站时间字体颜色
|
||||
},
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
|
@ -275,7 +275,6 @@ class SkinCode extends defaultStyle {
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
offset: { x: -8, y: 0 }, // 扣车偏移量
|
||||
trainColor: 'yellow', // 车站扣车颜色
|
||||
centerTrainColor: 'white', // 中心扣车颜色
|
||||
andCenterTrainColor: 'red', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
@ -283,9 +282,9 @@ class SkinCode extends defaultStyle {
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: { x: -8, y: -4 }, // 运行时间偏移量
|
||||
textColor: 'white' // 停站时间字体颜色
|
||||
textColor: 'white', // 停站时间字体颜色
|
||||
textFontSize: 10 // 停站时间字体大小
|
||||
},
|
||||
jump: {},
|
||||
level: { // 运行等级
|
||||
|
@ -6,12 +6,14 @@ class EDetain extends Group {
|
||||
super();
|
||||
this.model = model;
|
||||
this.detain = null;
|
||||
this.create();
|
||||
this.isNew = false;
|
||||
}
|
||||
|
||||
create() {
|
||||
if (this.isNew) {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
this.isNew = true;
|
||||
this.detain = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
@ -29,16 +31,19 @@ class EDetain extends Group {
|
||||
});
|
||||
this.add(this.detain);
|
||||
}
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
this.create();
|
||||
this.detain.setStyle('textFill', color);
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.detain.hide();
|
||||
this.detain && this.detain.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
this.create();
|
||||
this.detain.show();
|
||||
}
|
||||
}
|
||||
|
@ -6,11 +6,13 @@ class EJump extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
this.isNew = false;
|
||||
}
|
||||
create() {
|
||||
if (this.isNew) {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
this.isNew = true;
|
||||
this.jump = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
@ -45,17 +47,20 @@ class EJump extends Group {
|
||||
this.jumpArc.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
this.create();
|
||||
this.jump.setStyle('textFill', color);
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.jump.hide();
|
||||
this.jump && this.jump.hide();
|
||||
this.jumpArc && this.jumpArc.hide();
|
||||
}
|
||||
|
||||
show(isAllJump) {
|
||||
this.create();
|
||||
if (isAllJump) { // 站台跳停
|
||||
this.jump.show();
|
||||
this.jumpArc && this.jumpArc.show();
|
||||
|
@ -5,6 +5,7 @@ class ELevel extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.level = null;
|
||||
this.isNew = false;
|
||||
}
|
||||
|
||||
@ -20,16 +21,15 @@ class ELevel extends Group {
|
||||
style: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: style.StationStand.stopTime.textFontSize || style.StationStand.common.textFontSize,
|
||||
fontWeight: style.textStyle.fontWeight,
|
||||
fontSize: style.StationStand.stopTime.textFontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.StationStand.level.textColor,
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: 'middle'
|
||||
textAlign: style.textStyle.textAlign,
|
||||
textVerticalAlign: style.textStyle.textVerticalAlign
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.level);
|
||||
}
|
||||
}
|
||||
@ -45,8 +45,7 @@ class ELevel extends Group {
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.level.hide();
|
||||
this.level && this.level.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
|
@ -12,7 +12,6 @@ class EReentry extends Group {
|
||||
create() {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
|
||||
this.isNew = true;
|
||||
this.reentry = new Polygon({
|
||||
zlevel: model.zlevel,
|
||||
@ -36,8 +35,7 @@ class EReentry extends Group {
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.reentry.hide();
|
||||
this.reentry && this.reentry.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
|
@ -135,8 +135,8 @@ class StationStand extends Group {
|
||||
|
||||
/** 站台扣车*/
|
||||
const detainD = model.right ? 1 : -1;
|
||||
const detainX = model.position.x - (style.StationStand.stopTime.position || detainD) * (style.StationStand.detainCar.offset.x - model.width / 2);
|
||||
const detainY = model.position.y + (style.StationStand.stopTime.position || detainD) * (style.StationStand.detainCar.offset.y - model.height / 2);
|
||||
const detainX = model.position.x - (detainD) * (style.StationStand.detainCar.offset.x - model.width / 2);
|
||||
const detainY = model.position.y + (detainD) * (style.StationStand.detainCar.offset.y - model.height / 2);
|
||||
this.detain = new EDetain({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -150,6 +150,7 @@ class StationStand extends Group {
|
||||
this.add(this.detain);
|
||||
|
||||
/** 停站时间*/
|
||||
if (style.StationStand.stopTime.offset) {
|
||||
const timeDrict = model.right ? 1 : -1;
|
||||
const timeX = model.position.x - timeDrict * (style.StationStand.stopTime.offset.x - model.width / 2);
|
||||
const timeY = model.position.y + timeDrict * style.StationStand.stopTime.offset.y;
|
||||
@ -162,6 +163,7 @@ class StationStand extends Group {
|
||||
name: model.parkingTime || '30'
|
||||
});
|
||||
this.add(this.time);
|
||||
}
|
||||
|
||||
/** 运行等级*/
|
||||
const levelDrict = model.right ? 1 : -1;
|
||||
|
Loading…
Reference in New Issue
Block a user