调整站台计算坐标

This commit is contained in:
zyy 2019-12-18 09:49:44 +08:00
parent 33f140d71c
commit 399093bc72
4 changed files with 19 additions and 15 deletions

View File

@ -253,7 +253,7 @@ export default {
transferTrackName: '转换轨名称:', transferTrackName: '转换轨名称:',
transferTrackNamePosition: '转换轨名称偏移量:', transferTrackNamePosition: '转换轨名称偏移量:',
destinationCode: '目的地码:', destinationCode: '目的地码:',
destinationCodePoint: '目的地码坐标:', destinationCodePoint: '目的地码坐标偏移量:',
destinationCodeShow: '是否显示目的地码:', destinationCodeShow: '是否显示目的地码:',
leftStopPointOffset: '左向停车点偏移量:', leftStopPointOffset: '左向停车点偏移量:',
rightStopPointOffset: '右向停车点偏移量:', rightStopPointOffset: '右向停车点偏移量:',

View File

@ -8,6 +8,7 @@ import EMouse from './EMouse';
import ESingleControl from './ESingleControl'; import ESingleControl from './ESingleControl';
import EArrow from './EArrow'; import EArrow from './EArrow';
import { arrow } from '../utils/ShapePoints'; import { arrow } from '../utils/ShapePoints';
import BoundingRect from 'zrender/src/core/BoundingRect';
export default class Station extends Group { export default class Station extends Group {
constructor(model, style) { constructor(model, style) {
@ -256,17 +257,20 @@ export default class Station extends Group {
return null; return null;
} }
// getBoundingRect() { getBoundingRect() {
// const rect = this.stationText.getBoundingRect(); if (this.model.visible) {
// if (this.model.subheadDisplay) { const rect = this.stationText.getBoundingRect();
// const subheadText = this.subheadText.getBoundingRect(); // if (this.model.subheadDisplay) {
// rect.union(subheadText); // const subheadText = this.subheadText.getBoundingRect();
// return rect; // rect.union(subheadText);
// } else if (this.stationText) { // return rect;
// console.log(this.stationText, rect); // } else {
// return rect; return rect;
// } // }
// } } else {
return new BoundingRect(0, 0, 0, 0);
}
}
drawSelected(selected) { drawSelected(selected) {
this.EMouse && this.EMouse.drawSelected(selected); this.EMouse && this.EMouse.drawSelected(selected);

View File

@ -13,7 +13,7 @@ export function createTransform(opts) {
} }
export function createBoundingRect(view) { export function createBoundingRect(view) {
const rect = view.getBoundingRect(); const rect = view.getBoundingRect().clone();
const scale = view.scale[0]; const scale = view.scale[0];
const offsetX = view.position[0]; const offsetX = view.position[0];
const offsetY = view.position[1]; const offsetY = view.position[1];

View File

@ -3,11 +3,11 @@ 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'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康 BASE_API = 'http://192.168.3.82:9000'; // 杜康
} else { } else {
BASE_API = process.env.VUE_APP_BASE_API; BASE_API = process.env.VUE_APP_BASE_API;
} }