From 95415a3f4b7df6ec75ece6c4dd1f490147b46f39 Mon Sep 17 00:00:00 2001 From: qinoy Date: Fri, 2 Jun 2023 17:53:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=AF=E5=88=B0=E7=AB=AF=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=20=E8=8A=82=E7=82=B9=E5=B1=95=E5=BC=80=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../diagraming/designer.method.subprocess.js | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.method.subprocess.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.method.subprocess.js index 0e03b3d6..63c0bfdf 100644 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.method.subprocess.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.method.subprocess.js @@ -65,11 +65,25 @@ class SubProcess { // 范围选择框的事件绑定处理 handleScopeShapeEvent(){ - let d = $("#canvas_container"); let c = $("#designer_canvas"); - d.unbind("mousemove.operate").bind("mousemove.operate",function (a) { - let b = Utils.getRelativePos(a.pageX, a.pageY, c); - console.log('应该是当前鼠标指针的位置 ', b); + c.off("mousemove").on("mousemove",function (a) { + let b = Utils.getRelativePos(a.pageX, a.pageY, c); // 实时获取鼠标移动的坐标 + let j = Utils.getShapeByPosition(b.x, b.y); // 根据鼠标当前移动的位置获取当前图形 如果有的话 + if (j != null && j.shape.name == 'scopeLimitation') { // 当前鼠标所在位置为范围选择框范围内 + console.log('当前图形 ', j.shape.name); + let range = { + x: j.shape.props.x, + y: j.shape.props.y, + w: j.shape.props.w, + h: j.shape.props.h + }; + let e = Utils.getShapesByRange(range); + c.off("mousedown").on("mousedown", function (f) { + Utils.unselect(); + Utils.selectShape(e); + }); + + } }); }