端到端功能 节点展开交互部分代码提交
This commit is contained in:
parent
0c3a58ce1b
commit
95415a3f4b
@ -65,11 +65,25 @@ class SubProcess {
|
|||||||
|
|
||||||
// 范围选择框的事件绑定处理
|
// 范围选择框的事件绑定处理
|
||||||
handleScopeShapeEvent(){
|
handleScopeShapeEvent(){
|
||||||
let d = $("#canvas_container");
|
|
||||||
let c = $("#designer_canvas");
|
let c = $("#designer_canvas");
|
||||||
d.unbind("mousemove.operate").bind("mousemove.operate",function (a) {
|
c.off("mousemove").on("mousemove",function (a) {
|
||||||
let b = Utils.getRelativePos(a.pageX, a.pageY, c);
|
let b = Utils.getRelativePos(a.pageX, a.pageY, c); // 实时获取鼠标移动的坐标
|
||||||
console.log('应该是当前鼠标指针的位置 ', b);
|
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);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user