From 0e858fb921233b465f8e755a82711135120e4963 Mon Sep 17 00:00:00 2001 From: fan Date: Thu, 4 Aug 2022 16:17:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E9=80=89=E8=AE=BE=E5=A4=87=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E9=80=BB=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/mouseController.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/jmapNew/mouseController.js b/src/jmapNew/mouseController.js index 3334bdf95..7566f75e4 100644 --- a/src/jmapNew/mouseController.js +++ b/src/jmapNew/mouseController.js @@ -306,7 +306,18 @@ class MouseController extends Eventful { if (this.whetherInclude(boundingRect, deviceBoundingRect )) { includeDeviceList.push(item); } // item.instance._type !== deviceType.TrainWindow && - } else if (item.instance && item.instance._type !== deviceType.CheckBox && item.instance._type !== deviceType.Train && (window.location.href.indexOf('pictureDraw') > -1 && item.instance._type === deviceType.TrainWindow) ) { + } else if (window.location.href.indexOf('pictureDraw') > -1 && item.instance && item.instance._type === deviceType.TrainWindow) { + const rect = item.instance.getBoundingRect(); + const deviceBoundingRect = { + x1: rect.x, + y1: rect.y, + x2: rect.x, + y2: rect.y + }; + if (this.whetherInclude(boundingRect, deviceBoundingRect)) { + includeDeviceList.push(item); + } + } else if (item.instance && item.instance._type !== deviceType.CheckBox && item.instance._type !== deviceType.Train && item.instance._type !== deviceType.TrainWindow) { const rect = item.instance.getBoundingRect(); const deviceBoundingRect = { x1: rect.x,