Skip to content

Commit

Permalink
fix(editor): Fix canvas panning using Control + Left Mouse Button
Browse files Browse the repository at this point in the history
… on Windows (#12104)
  • Loading branch information
alexgrozav authored Dec 10, 2024
1 parent 8bf6cce commit 43009b6
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 33 deletions.
4 changes: 2 additions & 2 deletions packages/editor-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"@n8n/codemirror-lang-sql": "^1.0.2",
"@n8n/permissions": "workspace:*",
"@sentry/vue": "catalog:frontend",
"@vue-flow/background": "^1.3.1",
"@vue-flow/background": "^1.3.2",
"@vue-flow/controls": "^1.1.2",
"@vue-flow/core": "^1.41.4",
"@vue-flow/core": "^1.41.6",
"@vue-flow/minimap": "^1.5.0",
"@vue-flow/node-resizer": "^1.4.0",
"@vueuse/components": "^10.11.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/editor-ui/src/components/canvas/Canvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,12 @@ const selectionKeyCode = ref<true | null>(true);
onKeyDown(panningKeyCode.value, () => {
selectionKeyCode.value = null;
panningMouseButton.value = [0, 1];
});
onKeyUp(panningKeyCode.value, () => {
selectionKeyCode.value = true;
panningMouseButton.value = [1];
});
function selectLeftNode(id: string) {
Expand Down Expand Up @@ -642,7 +644,7 @@ provide(CanvasKey, {
@connect="onConnect"
@connect-end="onConnectEnd"
@pane-click="onClickPane"
@contextmenu="onOpenContextMenu"
@pane-context-menu="onOpenContextMenu"
@move-start="onPaneMoveStart"
@move-end="onPaneMoveEnd"
@node-drag-stop="onNodeDragStop"
Expand Down
60 changes: 30 additions & 30 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 43009b6

Please sign in to comment.