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); + }); + + } }); }