fix(editor): Fix moving canvas on middle click preventing lasso selection (#5996)

🐛 Prevent moving canvas on middle click
This commit is contained in:
Iván Ovejero 2023-04-18 12:04:26 +02:00 committed by GitHub
parent b351c62659
commit 3c2a56928b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,7 +39,7 @@ export const moveNodeWorkflow = mixins(deviceSupportHelpers).extend({
return; 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) { if (e.button !== 1) {
this.uiStore.nodeViewMoveInProgress = true; this.uiStore.nodeViewMoveInProgress = true;
} }
@ -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 // 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; this.uiStore.nodeViewMoveInProgress = true;
} }