列车详情显示调整

This commit is contained in:
fan 2021-12-10 17:20:10 +08:00
parent 04c57cda86
commit 25ba9a047e

View File

@ -171,7 +171,13 @@ class EMouse extends Group {
} }
mouseover() { mouseover() {
if (this.device.model.style.Train.common.trainTip) { if (this.device.model.style.Train.common.trainTip) {
const zrRect = { x: this.device.model.model.zrOptions.offsetX, y: this.device.model.model.zrOptions.offsetY, width: store.state.config.width, height: store.state.config.height }; const scaleRate = parseFloat(this.device.model.model.zrOptions.scaleRate);
const zrRect = {
x: this.device.model.model.zrOptions.offsetX / scaleRate,
y: this.device.model.model.zrOptions.offsetY / scaleRate,
width: store.state.config.width / scaleRate,
height: store.state.config.height / scaleRate
};
this.device.deviceModel.__down = true; this.device.deviceModel.__down = true;
const arrowTextRect = this.arrowText.getBoundingRect(); const arrowTextRect = this.arrowText.getBoundingRect();
const zrRectX = zrRect.x + zrRect.width; const zrRectX = zrRect.x + zrRect.width;