fix: fix trigger multiple moved event when close movable config

This commit is contained in:
vector
2021-01-31 09:57:08 +08:00
parent 6dd3372e67
commit 3eb9d6934e
3 changed files with 7 additions and 3 deletions

View File

@ -1059,7 +1059,7 @@ export class NodeView<
) {
const cells = [cell]
const selection = this.graph.selection.widget
if (selection) {
if (selection && selection.options.movable) {
const selectedCells = this.graph.getSelectedCells()
cells.push(
...selectedCells.filter((c: Cell) => c.isNode() && c.id !== cell.id),

View File

@ -130,7 +130,9 @@ if (graph.isRubberbandEnabled()) {
### movable
选中的节点是否可以被移动,设置为 `true` 时,拖动选框触发节点移动,默认为 `true`
在多选情况下,选中的节点是否一起移动,设置为 `true` 时,拖动选框框选的节点一起移动,默认为 `true`
<img src="https://gw.alipayobjects.com/mdn/rms_43231b/afts/img/A*MD11S4oxIJIAAAAAAAAAAAAAARQnAQ" width="600px" height="300px" alt="movable"/>
### content

View File

@ -130,7 +130,9 @@ if (graph.isRubberbandEnabled()) {
### movable
选中的节点是否可以被移动,设置为 `true` 时,拖动选框触发节点移动,默认为 `true`
在多选情况下,选中的节点是否一起移动,设置为 `true` 时,拖动选框框选的节点一起移动,默认为 `true`
<img src="https://gw.alipayobjects.com/mdn/rms_43231b/afts/img/A*MD11S4oxIJIAAAAAAAAAAAAAARQnAQ" width="600px" height="300px" alt="movable"/>
### content