宁波三号线列车显示调整
This commit is contained in:
parent
2eca40ba41
commit
78e065ec7a
@ -17,7 +17,7 @@ export default class ETriangle extends Group {
|
||||
if (model && model.point) {
|
||||
const right = model.right == 1 ? 1 : -1;
|
||||
if (this.style.Section.trainPosition.specialShow) {
|
||||
this.stopRect = new Rect({ // 停车标识
|
||||
this.openDoorRect = new Rect({ // 停车标识
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
@ -31,6 +31,20 @@ export default class ETriangle extends Group {
|
||||
fill: 'rgba(26, 54, 88, 0.7)'
|
||||
}
|
||||
});
|
||||
this.stopRect = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x: model.point.x - this.style.Section.trainPosition.stopTrainRectWidth,
|
||||
y: model.point.y - this.style.Section.line.width / 4,
|
||||
width: 4,
|
||||
height: this.style.Section.line.width + 2
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0,
|
||||
fill: 'rgba(255,0,0,0.7)'
|
||||
}
|
||||
});
|
||||
this.angle1 = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
@ -64,8 +78,9 @@ export default class ETriangle extends Group {
|
||||
});
|
||||
this.add(this.angle1);
|
||||
this.add(this.angle);
|
||||
this.add(this.openDoorRect);
|
||||
this.add(this.stopRect);
|
||||
this.stopRect.hide();
|
||||
this.openDoorRect.hide();
|
||||
} else {
|
||||
this.angle = new Polygon({
|
||||
zlevel: model.zlevel,
|
||||
@ -136,7 +151,7 @@ export default class ETriangle extends Group {
|
||||
});
|
||||
this.angle1.dirty();
|
||||
}
|
||||
if (this.stopRect) {
|
||||
if (this.openDoorRect) {
|
||||
const offset = (this.style.Section.trainPosition.specialRectWidth - this.style.Section.line.width) / 2;
|
||||
let trainRight = model.x + offset;
|
||||
if (right == 1) {
|
||||
@ -148,6 +163,26 @@ export default class ETriangle extends Group {
|
||||
width: this.style.Section.line.width - 2,
|
||||
height: this.style.Section.line.width - 2
|
||||
};
|
||||
this.openDoorRect.attr({
|
||||
shape: pointsData
|
||||
});
|
||||
this.openDoorRect.animateTo({
|
||||
shape: pointsData
|
||||
}, 10, 0, 'elasticOut', function () {
|
||||
});
|
||||
this.openDoorRect.dirty();
|
||||
}
|
||||
if (this.stopRect) {
|
||||
let trainRight = model.x + this.style.Section.trainPosition.specialRectWidth;
|
||||
if (right == 1) {
|
||||
trainRight = model.x - this.style.Section.trainPosition.specialRectWidth - 4;
|
||||
}
|
||||
const pointsData = {
|
||||
x: trainRight,
|
||||
y: model.y - this.style.Section.line.width / 2,
|
||||
width: 4,
|
||||
height: this.style.Section.line.width + 2
|
||||
};
|
||||
this.stopRect.attr({
|
||||
shape: pointsData
|
||||
});
|
||||
@ -161,7 +196,6 @@ export default class ETriangle extends Group {
|
||||
trainB.setPositionText(model, right);
|
||||
}
|
||||
}
|
||||
|
||||
setStopShow(flag) {
|
||||
if (flag) {
|
||||
this.stopRect && this.stopRect.show();
|
||||
@ -169,4 +203,11 @@ export default class ETriangle extends Group {
|
||||
this.stopRect && this.stopRect.hide();
|
||||
}
|
||||
}
|
||||
setOpenDoorShow(flag) {
|
||||
if (flag) {
|
||||
this.openDoorRect && this.openDoorRect.show();
|
||||
} else {
|
||||
this.openDoorRect && this.openDoorRect.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -347,11 +347,14 @@ export default class Train extends Group {
|
||||
if (status != undefined) {
|
||||
if (status) {
|
||||
this.trainB && this.trainB.setDShow(false);
|
||||
this.triangle && this.triangle.setOpenDoorShow(false);
|
||||
} else {
|
||||
this.trainB && this.trainB.setDShow(true);
|
||||
this.triangle && this.triangle.setOpenDoorShow(true);
|
||||
}
|
||||
} else {
|
||||
this.trainB && this.trainB.setDShow(false);
|
||||
this.triangle && this.triangle.setOpenDoorShow(false);
|
||||
}
|
||||
}
|
||||
// 设置通信状态类型
|
||||
|
@ -24,14 +24,14 @@ export function handlerUrl(data) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// const data = null;
|
||||
// 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.233/rtss-server';
|
||||
// BASE_API = 'http://114.116.51.125/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.90:9100'; // 周寅
|
||||
// BASE_API = 'http://192.168.3.94:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.15:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 夏增彬
|
||||
BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
|
||||
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
|
Loading…
Reference in New Issue
Block a user