调整地图绘制,公共地图车站 ,站台显示逻辑判断

This commit is contained in:
zyy 2020-03-06 16:16:04 +08:00
parent 93be0b7ff6
commit 6c797c50e6
3 changed files with 23 additions and 16 deletions

View File

@ -353,7 +353,7 @@ class SkinCode extends defaultStyle {
lamp: {
count: 4, // 控制模式的个数
offset: { x: 20, y: 0 }, // 偏移量
radiusR: 5, // 控制模式灯的半径
radiusR: 6, // 控制模式灯的半径
distance: 46, // 控制模式之间灯之间的距离
grayColor: '#C0C0C0', // 控制模式灰色
greenColor: 'green', // 控制模式绿色

View File

@ -20,19 +20,22 @@ export default class Station extends Group {
this.z = 40;
this.model = model;
this.style = style;
const arr = window.location.href.split('?')[1].split('&');
this.prdType = '';
arr.forEach(elem => {
if (elem.split('=')[0] === 'prdType') {
this.prdType = elem.split('=')[1];
}
});
this.create();
this.createTurnBack(); // 创建按图折返
const path = window.location.href;
if (!path.includes('/map/draw')) {
this.createGuideTotalLock(); // 创建引导总锁
}
this.prdType = '';
if (path.includes('?')) {
const arr = window.location.href.split('?')[1].split('&');
arr.forEach(elem => {
if (elem.split('=')[0] === 'prdType') {
this.prdType = elem.split('=')[1];
}
});
}
this.createControlMode();
this.setState(model);
this.checkIsDrawMap();
@ -118,7 +121,8 @@ export default class Station extends Group {
createGuideTotalLock() { // 创建引导总锁
const model = this.model;
const style = this.style;
if (model.guideTotalLock || !this.prdType || style.Station.functionButtonShow.indexOf(this.prdType) !== -1) {
console.log(model.guideTotalLockPoint);
if (model.guideTotalLock || (!this.prdType && style.Station.functionButtonShow.indexOf(this.prdType) !== -1 && model.guideTotalLockPoint)) {
this.guideLamp = new EControl({
zlevel: this.zlevel,
z: this.z,

View File

@ -23,16 +23,19 @@ class StationStand extends Group {
this.zlevel = model.zlevel;
this.z = 1;
this.doors = new Group();
const arr = window.location.href.split('?')[1].split('&');
this.prdType = '';
arr.forEach(elem => {
if (elem.split('=')[0] === 'prdType') {
this.prdType = elem.split('=')[1];
}
});
const path = window.location.href;
if (path.includes('?')) {
const arr = window.location.href.split('?')[1].split('&');
arr.forEach(elem => {
if (elem.split('=')[0] === 'prdType') {
this.prdType = elem.split('=')[1];
}
});
}
this.create();
this.createMouseEvent();
if (!this.prdType || this.style.StationStand.common.functionButtonShow.indexOf(this.prdType) !== -1 ) {
if (!this.prdType || (this.style.StationStand.common.functionButtonShow.indexOf(this.prdType) !== -1 && model.guideTotalLockPoint)) {
this.createFunctionButton();
}
this.setVisible(model.visible);