Skip to content

Commit

Permalink
fix: optimize move performace while select multiple nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
xiawenqi committed Feb 14, 2024
1 parent f29fe2d commit 7307a72
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/x6-plugin-selection/src/selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ export class SelectionImpl extends View<SelectionImpl.EventArgs> {
collection.on('reseted', this.onReseted, this)
collection.on('updated', this.onCollectionUpdated, this)
collection.on('node:change:position', this.onNodePositionChanged, this)
collection.on('cell:changed', this.onCellChanged, this)
collection.on('node:change:angle', this.onCellChanged, this)
collection.on('node:change:size', this.onCellChanged, this)
}

protected stopListening() {
Expand All @@ -101,7 +102,8 @@ export class SelectionImpl extends View<SelectionImpl.EventArgs> {
collection.off('reseted', this.onReseted, this)
collection.off('updated', this.onCollectionUpdated, this)
collection.off('node:change:position', this.onNodePositionChanged, this)
collection.off('cell:changed', this.onCellChanged, this)
collection.off('node:change:angle', this.onCellChanged, this)
collection.off('node:change:size', this.onCellChanged, this)
}

protected onRemove() {
Expand Down

0 comments on commit 7307a72

Please sign in to comment.