Skip to content

Commit

Permalink
fix: 先触发selectionchanged, 再做数据交互用于redo/undo
Browse files Browse the repository at this point in the history
  • Loading branch information
小耀 authored and bubkoo committed Apr 18, 2020
1 parent e64af7f commit 8f187ca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/x6/src/change/selection-change.ts
Expand Up @@ -26,14 +26,14 @@ export class SelectionChange implements IChange {
this.added.forEach(cell => this.selection.doAddCell(cell))
}

const tmp = this.added
this.added = this.removed
this.removed = tmp

this.selection.graph.trigger('selection:changed', {
added: this.added,
removed: this.removed,
selected: this.selection.cells.slice(),
})

const tmp = this.added
this.added = this.removed
this.removed = tmp
}
}

0 comments on commit 8f187ca

Please sign in to comment.