This commit is contained in:
fan 2020-03-30 09:47:26 +08:00
parent a8d9aa001c
commit 8f69177fe1
9 changed files with 37 additions and 44 deletions

View File

@ -289,6 +289,7 @@ class SkinCode extends defaultStyle {
textColor: '#FFFFFF', // 停站时间字体颜色
textFontSize: 8
},
trainStop: {}, // 停车标志
level: { // 运行等级
position: 1, // 运行等级方向
offset: { x: -8, y: 10 }, // 运行等级偏移量

View File

@ -248,6 +248,7 @@ class SkinCode extends defaultStyle {
fontWeight: 'normal', // 文字居中
textFontSize: 11 // 圆半径大小
},
trainStop: {}, // 停车标志
level: { // 运行等级
position: 1, // 运行等级方向
offset: {x: -8, y: 30}, // 运行等级偏移量

View File

@ -254,6 +254,7 @@ class SkinCode extends defaultStyle {
fontWeight: 'normal',
textFontSize: 11
},
trainStop: {}, // 停车标志
level: { // 运行等级
position: 1, // 运行等级方向
offset: {x: -8, y: 15}, // 运行等级偏移量

View File

@ -243,6 +243,7 @@ class SkinCode extends defaultStyle {
fontWeight: 'normal', // 文字居中
textFontSize: 11
},
trainStop: {}, // 停车标志
level: { // 运行等级
position: 1, // 运行等级方向
offset: {x: -8, y: -6}, // 运行等级偏移量

View File

@ -243,6 +243,11 @@ class SkinCode extends defaultStyle {
fontSize: 18
},
stopTime: {}, // 停站时间
trainStop: { // 停车标志
fillColor: '#FF0000',
insideOffset:{ x: 10, y: -20}, // 内站台停车标志偏移量
outsideOffset: { x: -10, y: 20} // 外站台停车标志偏移量
},
level: { // 运行等级
position: 1, // 运行等级方向
offset: { x: -8, y: 6 }, // 运行等级偏移量

View File

@ -283,6 +283,7 @@ class SkinCode extends defaultStyle {
textFontSize: 10 // 停站时间字体大小
},
jump: {},
trainStop: {}, // 停车标志
level: { // 运行等级
position: -1, // 运行等级方向
offset: { x: -8, y: 4 }, // 运行等级偏移量

View File

@ -11,33 +11,13 @@ class ETrainStop extends Group {
create() {
if (!this.isNew) {
const model = this.model;
const gag = 22;
this.isNew = true;
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 - gag;
cx = model.x + model.width / 8;
} else {
cy = model.y + gag;
cx = model.x - model.width / 8;
}
} else {
if (model.inside) {
cy = model.y + gag;
cx = model.x - model.width / 8;
} else {
cy = model.y - gag;
cx = model.x + model.width / 8;
}
}
this.trainStop = new Arc({
zlevel: model.zlevel,
z: model.z,
shape: {
cx: cx,
cy: cy,
cx: model.x,
cy: model.y,
r: model.r
},
style: {
@ -54,9 +34,8 @@ class ETrainStop extends Group {
this.trainStop.setStyle('textFill', color);
}
hide() {
this.create();
this.trainStop.hide();
hideMode() {
this.trainStop && this.trainStop.hide();
}
show() {

View File

@ -79,21 +79,25 @@ class StationStand extends Group {
this.add(this.emergent);
// 列车停站
const stopX = model.position.x;
const stopY = model.position.y;
this.trainStop = new ETrainStop({
zlevel: this.zlevel,
z: this.z + 1,
style: style,
inside: model.inside,
right: model.right,
width: model.width,
x: stopX,
y: stopY,
r: style.StationStand.standEmergent.mergentR,
n: 4
});
this.add(this.trainStop);
const stopTrainOffset = model.inside ? style.StationStand.trainStop.insideOffset : style.StationStand.trainStop.outsideOffset;
const stopTrainH = model.right ? 1 : -1;
const stopX = model.position.x + stopTrainH * stopTrainOffset.x;
const stopY = model.position.y + stopTrainH * stopTrainOffset.y;
if (style.StationStand.trainStop.insideOffset) {
this.trainStop = new ETrainStop({
zlevel: this.zlevel,
z: this.z + 1,
style: style,
inside: model.inside,
right: model.right,
width: model.width,
x: stopX,
y: stopY,
r: style.StationStand.standEmergent.mergentR,
n: 4
});
this.add(this.trainStop);
}
// 列车出发
const departX = model.position.x;
@ -343,7 +347,7 @@ class StationStand extends Group {
this.level && this.level.hideMode();
this.detain && this.detain.hideMode();
this.emergent && this.emergent.hideMode();
this.trainStop && this.trainStop.hide(); // 列车停站
this.trainStop && this.trainStop.hideMode(); // 列车停站
this.trainDepart && this.trainDepart.hide();
this.reentry && this.reentry.hideMode();
this.jump && this.jump.hideMode();
@ -361,7 +365,7 @@ class StationStand extends Group {
if (!this.style.StationStand.common.special) {
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.stopColor);
} else {
this.trainStop && this.trainStop.show();
this.trainStop && this.trainStop.showMode();
this.trainDepart && this.trainDepart.show();
}
}

View File

@ -3,10 +3,10 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康