列车位置调整

This commit is contained in:
fan 2020-03-09 18:25:25 +08:00
parent 1148ea5ad8
commit 96a9c73c29
4 changed files with 8 additions and 6 deletions

View File

@ -560,7 +560,7 @@ class SkinCode extends defaultStyle {
trainHeadTriangleSecond: { x: 4, y: 7.5 }, // 列车车头三角坐标2偏移量 trainHeadTriangleSecond: { x: 4, y: 7.5 }, // 列车车头三角坐标2偏移量
trainHeadTriangleThird: { x: 0, y: 15 }, // 列车车头三角坐标3偏移量 trainHeadTriangleThird: { x: 0, y: 15 }, // 列车车头三角坐标3偏移量
trainHeadRectHeight: 15, // 列车车头矩形高度 trainHeadRectHeight: 15, // 列车车头矩形高度
trainConntWidth: 4, // 列车竖杠的宽度 trainConntWidth: 0, // 列车竖杠的宽度
trainHeadFillColor: '#EF0C08'// 列车车头矩形填充颜色 trainHeadFillColor: '#EF0C08'// 列车车头矩形填充颜色
}, },
common: { common: {

View File

@ -180,9 +180,9 @@ export default class TrainBody extends Group {
}); });
// this.add(this.atrStatus); // this.add(this.atrStatus);
} }
const travelSignsOffsetX = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.x : style.Train.travelSigns.trainTravelLeftSignsOffset.x;
const travelSignsOffsetY = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.y : style.Train.travelSigns.trainTravelLeftSignsOffset.y;
if (style.Train.common.hasTravelSigns) { if (style.Train.common.hasTravelSigns) {
const travelSignsOffsetX = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.x : style.Train.travelSigns.trainTravelLeftSignsOffset.x;
const travelSignsOffsetY = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.y : style.Train.travelSigns.trainTravelLeftSignsOffset.y;
this.travelSigns = new ETextName({ this.travelSigns = new ETextName({
zlevel: model.zlevel, zlevel: model.zlevel,
z: model.z + 1, z: model.z + 1,

View File

@ -43,9 +43,11 @@ export default class Train extends Group {
y: model.trainWindowModel.point.y y: model.trainWindowModel.point.y
}; };
if (model.right) { if (model.right) {
this.point.x = this.point.x + model.trainWindowModel.width / 2 - style.Train.trainHead.trainConntWidth * this.newScale - style.Train.common.trainWidth; this.point.x = this.point.x - style.Train.trainHead.trainConntWidth * this.newScale - style.Train.common.trainWidth / 2;
this.point.y = this.point.y - style.Train.common.trainHeight/2;
} else { } else {
this.point.x = this.point.x - model.trainWindowModel.width / 2 + style.Train.trainHead.trainConntWidth * this.newScale; this.point.x = this.point.x + style.Train.trainHead.trainConntWidth * this.newScale - style.Train.common.trainWidth / 2;
this.point.y = this.point.y + model.trainWindowModel.height - style.Train.common.trainHeight/2;
} }
} else { } else {
this.point = model.position; this.point = model.position;

View File

@ -3,7 +3,7 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // 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.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6: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'; // 张赛