调整哈尔滨车站 显示
This commit is contained in:
parent
e46239c8b9
commit
915d1372e5
@ -21,23 +21,25 @@ class EDetain extends Group {
|
||||
this.isNew = true;
|
||||
if (style.StationStand.common.special) {
|
||||
// inside true 内侧
|
||||
const gag = 22;
|
||||
const gagX = 6; // 左右间隔
|
||||
let height = '';
|
||||
let position = '';
|
||||
if (model.right) {
|
||||
if (model.inside) {
|
||||
height = -30;
|
||||
position = -model.width / 4;
|
||||
height = -gag;
|
||||
position = -model.width / 4 - gagX;
|
||||
} else {
|
||||
height = 30;
|
||||
position = model.width / 4;
|
||||
height = gag;
|
||||
position = model.width / 4 + gagX;
|
||||
}
|
||||
} else {
|
||||
if (model.inside) {
|
||||
height = 30;
|
||||
position = model.width / 4;
|
||||
height = gag;
|
||||
position = model.width / 4 + gagX;
|
||||
} else {
|
||||
height = -30;
|
||||
position = -model.width / 4;
|
||||
height = -gag;
|
||||
position = -model.width / 4 - gagX;
|
||||
}
|
||||
}
|
||||
this.detain = new Text({
|
||||
@ -48,7 +50,8 @@ class EDetain extends Group {
|
||||
x: model.x + position,
|
||||
y: model.y + height,
|
||||
text: textName,
|
||||
textAlign: model.inside ? 'left' : 'right',
|
||||
// textAlign: model.inside ? 'left' : 'right',
|
||||
textAlign: 'center',
|
||||
fontWeight: 'blod',
|
||||
fontSize: `${style.StationStand.detainCar.fontSize} px ${style.fontFamily}`,
|
||||
textFill: textName == 'E' ? '#fff' : 'red',
|
||||
|
@ -19,23 +19,42 @@ class ESafeEmergent extends Group {
|
||||
|
||||
this.isNew = true;
|
||||
if (style.StationStand.common.special) {
|
||||
const height = model.inside ? model.y + 26 : model.y - 33;
|
||||
const width = model.inside ? model.x + model.width / 8 : model.x - model.width / 8;
|
||||
const gagT = 19;
|
||||
const gagB = 26;
|
||||
let cy = model.inside ? model.y + 22 : model.y - 22;
|
||||
let cx = model.inside ? model.x + model.width / 8 : model.x - model.width / 8;
|
||||
if (model.right) {
|
||||
if (model.inside) {
|
||||
cy = model.y - gagB;
|
||||
cx = model.x - model.width / 8;
|
||||
} else {
|
||||
cy = model.y + gagT;
|
||||
cx = model.x + model.width / 8;
|
||||
}
|
||||
} else {
|
||||
if (model.inside) {
|
||||
cy = model.y + gagT;
|
||||
cx = model.x + model.width / 8;
|
||||
} else {
|
||||
cy = model.y - gagB;
|
||||
cx = model.x - model.width / 8;
|
||||
}
|
||||
}
|
||||
this.emergent = new Polyline({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
points: [
|
||||
[width, height - 3],
|
||||
[width + 7, height],
|
||||
[width + 7, height + 3],
|
||||
[width + 3, height + 3],
|
||||
[width + 3, height + 10],
|
||||
[width - 3, height + 10],
|
||||
[width - 3, height + 3],
|
||||
[width - 7, height + 3],
|
||||
[width - 7, height],
|
||||
[width, height - 3]
|
||||
[cx, cy - 2],
|
||||
[cx + 5, cy],
|
||||
[cx + 5, cy + 2],
|
||||
[cx + 2, cy + 2],
|
||||
[cx + 2, cy + 6],
|
||||
[cx - 2, cy + 6],
|
||||
[cx - 2, cy + 2],
|
||||
[cx - 5, cy + 2],
|
||||
[cx - 5, cy],
|
||||
[cx, cy - 2]
|
||||
]
|
||||
},
|
||||
style: {
|
||||
|
@ -14,24 +14,24 @@ class ETrainDepart extends Group {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
|
||||
const gag = 22;
|
||||
this.isNew = true;
|
||||
let cy = model.inside ? model.y + 30 : model.y - 30;
|
||||
let cy = model.inside ? model.y + gag : model.y - gag;
|
||||
let cx = model.inside ? model.x - model.width / 4 - model.width / 8 : model.x + model.width / 4 + model.width / 8;
|
||||
if (model.right) {
|
||||
if (model.inside) {
|
||||
cy = model.y - 30;
|
||||
cy = model.y - gag;
|
||||
cx = model.x + model.width / 4 + model.width / 8;
|
||||
} else {
|
||||
cy = model.y + 30;
|
||||
cy = model.y + gag;
|
||||
cx = model.x - model.width / 4 - model.width / 8;
|
||||
}
|
||||
} else {
|
||||
if (model.inside) {
|
||||
cy = model.y + 30;
|
||||
cy = model.y + gag;
|
||||
cx = model.x - model.width / 4 - model.width / 8;
|
||||
} else {
|
||||
cy = model.y - 30;
|
||||
cy = model.y - gag;
|
||||
cx = model.x + model.width / 4 + model.width / 8;
|
||||
}
|
||||
}
|
||||
|
@ -11,24 +11,24 @@ class ETrainStop extends Group {
|
||||
create() {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
|
||||
const gag = 22;
|
||||
this.isNew = true;
|
||||
let cy = model.inside ? model.y + 30 : model.y - 30;
|
||||
let cy = model.inside ? model.y + gag : model.y - gag;
|
||||
let cx = model.inside ? model.x - model.width / 8 : model.x + model.width / 8;
|
||||
if (model.right) {
|
||||
if (model.inside) {
|
||||
cy = model.y - 30;
|
||||
cy = model.y - gag;
|
||||
cx = model.x + model.width / 8;
|
||||
} else {
|
||||
cy = model.y + 30;
|
||||
cy = model.y + gag;
|
||||
cx = model.x - model.width / 8;
|
||||
}
|
||||
} else {
|
||||
if (model.inside) {
|
||||
cy = model.y + 30;
|
||||
cy = model.y + gag;
|
||||
cx = model.x - model.width / 8;
|
||||
} else {
|
||||
cy = model.y - 30;
|
||||
cy = model.y - gag;
|
||||
cx = model.x + model.width / 8;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user