Skip to content

Commit

Permalink
fix(editor): Fix moving canvas on middle click preventing lasso selec…
Browse files Browse the repository at this point in the history
…tion (#5996)

🐛 Prevent moving canvas on middle click
  • Loading branch information
ivov authored and netroy committed Apr 20, 2023
1 parent 4a521a4 commit a7a5778
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/editor-ui/src/mixins/moveNodeWorkflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const moveNodeWorkflow = mixins(deviceSupportHelpers).extend({
return;
}

// Don't indicate move start just yet if middle button is pressed
// Prevent moving canvas on anything but middle button
if (e.button !== 1) {
this.uiStore.nodeViewMoveInProgress = true;
}
Expand Down Expand Up @@ -77,7 +77,7 @@ export const moveNodeWorkflow = mixins(deviceSupportHelpers).extend({
}

// Signal that moving canvas is active if middle button is pressed and mouse is moved
if (e.button === 1) {
if (e.buttons === 4) {
this.uiStore.nodeViewMoveInProgress = true;
}

Expand Down

0 comments on commit a7a5778

Please sign in to comment.