diff --git a/packages/x6-plugin-selection/src/selection.ts b/packages/x6-plugin-selection/src/selection.ts index 4e1bd0addf..1657c6c6a8 100644 --- a/packages/x6-plugin-selection/src/selection.ts +++ b/packages/x6-plugin-selection/src/selection.ts @@ -127,7 +127,9 @@ export class SelectionImpl extends View { const { ui, selection, translateBy, snapped } = options const allowTranslating = - (showNodeSelectionBox !== true || (pointerEvents && this.getPointerEventsValue(pointerEvents) === 'none')) && + (showNodeSelectionBox !== true || + (pointerEvents && + this.getPointerEventsValue(pointerEvents) === 'none')) && !this.translating && !selection @@ -386,11 +388,7 @@ export class SelectionImpl extends View { const client = this.graph.snapToGrid(e.clientX, e.clientY) this.notifyBoxEvent('box:mousedown', e, client.x, client.y) // this.delegateDocumentEvents(Private.documentEvents, e.data) - this.addEventListeners( - this.graph.container, - Private.documentEvents, - evt.data, - ) + this.addEventListeners(this.graph.container, Private.documentEvents, e.data) } protected startTranslating(evt: Dom.MouseDownEvent) { @@ -830,7 +828,9 @@ export class SelectionImpl extends View { ) } - protected getPointerEventsValue(pointerEvents: 'none' | 'auto' | ((cells: Cell[]) => 'none' | 'auto')) { + protected getPointerEventsValue( + pointerEvents: 'none' | 'auto' | ((cells: Cell[]) => 'none' | 'auto'), + ) { return typeof pointerEvents === 'string' ? pointerEvents : pointerEvents(this.cells)