From 7307a72634924fb85b510d2068882b9a45f82b7e Mon Sep 17 00:00:00 2001 From: Xia Wenqi Date: Wed, 14 Feb 2024 11:35:11 +0800 Subject: [PATCH] fix: optimize move performace while select multiple nodes --- packages/x6-plugin-selection/src/selection.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/x6-plugin-selection/src/selection.ts b/packages/x6-plugin-selection/src/selection.ts index 243b604e422..2854ca813d7 100644 --- a/packages/x6-plugin-selection/src/selection.ts +++ b/packages/x6-plugin-selection/src/selection.ts @@ -83,7 +83,8 @@ export class SelectionImpl extends View { 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() { @@ -101,7 +102,8 @@ export class SelectionImpl extends View { 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() {