调整哈尔滨线路扣车状态
This commit is contained in:
parent
157a505e72
commit
a1416b9a23
@ -242,7 +242,7 @@ class SkinCode extends defaultStyle {
|
|||||||
detainCar: { // 扣车
|
detainCar: { // 扣车
|
||||||
text: '扣', // 扣车显示内容
|
text: '扣', // 扣车显示内容
|
||||||
position: -1, // 扣车方向
|
position: -1, // 扣车方向
|
||||||
offset: {x: -8, y: -20}, // 扣车偏移量
|
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||||
trainColor: '#FFFF00', // 车站扣车颜色
|
trainColor: '#FFFF00', // 车站扣车颜色
|
||||||
centerTrainColor: '#C0C0C0', // 中心扣车颜色
|
centerTrainColor: '#C0C0C0', // 中心扣车颜色
|
||||||
andCenterTrainColor: '#C0C0C0', // 车站+中心扣车颜色
|
andCenterTrainColor: '#C0C0C0', // 车站+中心扣车颜色
|
||||||
|
@ -42,6 +42,7 @@ class EDetain extends Group {
|
|||||||
position = -model.width / 4 - gagX;
|
position = -model.width / 4 - gagX;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(textName);
|
||||||
this.detain = new Text({
|
this.detain = new Text({
|
||||||
zlevel: model.zlevel,
|
zlevel: model.zlevel,
|
||||||
z: model.z,
|
z: model.z,
|
||||||
@ -90,14 +91,13 @@ class EDetain extends Group {
|
|||||||
this.detain.hide();
|
this.detain.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
show() {
|
show(nameText) {
|
||||||
if (this.model.style.StationStand.common.special) {
|
if (this.model.style.StationStand.common.special && nameText) {
|
||||||
this.detain.setStyle('text', 'H');
|
this.detain.setStyle('text', nameText);
|
||||||
} else {
|
} else {
|
||||||
this.create('H');
|
this.create();
|
||||||
this.detain.show();
|
this.detain.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -416,19 +416,31 @@ class StationStand extends Group {
|
|||||||
|
|
||||||
/** 车站扣车*/
|
/** 车站扣车*/
|
||||||
standDetainTrain() {
|
standDetainTrain() {
|
||||||
this.detain && this.detain.show();
|
if (this.style.StationStand.common.special) {
|
||||||
|
this.detain && this.detain.show('H');
|
||||||
|
} else {
|
||||||
|
this.detain && this.detain.show();
|
||||||
|
}
|
||||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.detainTrainTextColor);
|
this.detain && this.detain.setColor(this.style.StationStand.detainCar.detainTrainTextColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 中心扣车*/
|
/** 中心扣车*/
|
||||||
centerDetainTrain() {
|
centerDetainTrain() {
|
||||||
this.detain && this.detain.show();
|
if (this.style.StationStand.common.special) {
|
||||||
|
this.detain && this.detain.show('H');
|
||||||
|
} else {
|
||||||
|
this.detain && this.detain.show();
|
||||||
|
}
|
||||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.centerTrainColor);
|
this.detain && this.detain.setColor(this.style.StationStand.detainCar.centerTrainColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 中心+车站扣车*/
|
/** 中心+车站扣车*/
|
||||||
standAndCenterDetainTrain() {
|
standAndCenterDetainTrain() {
|
||||||
this.detain && this.detain.show();
|
if (this.style.StationStand.common.special) {
|
||||||
|
this.detain && this.detain.show('H');
|
||||||
|
} else {
|
||||||
|
this.detain && this.detain.show();
|
||||||
|
}
|
||||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.andCenterTrainColor);
|
this.detain && this.detain.setColor(this.style.StationStand.detainCar.andCenterTrainColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user