hookehuyr

fix 修复node节点拖动不顺畅的问题

...@@ -65,7 +65,7 @@ export function dragNode(G6) { ...@@ -65,7 +65,7 @@ export function dragNode(G6) {
65 }); 65 });
66 66
67 // 只拖动当前节点 67 // 只拖动当前节点
68 - if (dragNodes.length === 0) { 68 + if (dragNodes.length === 1) {
69 this.target = item; 69 this.target = item;
70 this.target.origin = { 70 this.target.origin = {
71 x: item._cfg.model.x, 71 x: item._cfg.model.x,
...@@ -111,7 +111,7 @@ export function dragNode(G6) { ...@@ -111,7 +111,7 @@ export function dragNode(G6) {
111 graph.setAutoPaint(false); 111 graph.setAutoPaint(false);
112 112
113 // 当targets中元素时,则说明拖动的是多个选中的元素 113 // 当targets中元素时,则说明拖动的是多个选中的元素
114 - if (this.targets.length > 0) { 114 + if (this.targets.length > 1) {
115 if (this.enableDelegate) { 115 if (this.enableDelegate) {
116 this._updateDelegate(e); 116 this._updateDelegate(e);
117 } else { 117 } else {
......