From 3039b4526d46fec7430d5782a12cee03e21c85ba Mon Sep 17 00:00:00 2001 From: Terry Jia Date: Sat, 26 Jul 2025 12:43:22 -0400 Subject: [PATCH] add shift + scroll to pan horizontally (#1164) --- src/LGraphCanvas.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/LGraphCanvas.ts b/src/LGraphCanvas.ts index 3a6892a4c..6d4764f35 100644 --- a/src/LGraphCanvas.ts +++ b/src/LGraphCanvas.ts @@ -3224,6 +3224,8 @@ export class LGraphCanvas implements CustomEventDispatcher } else if (e.ctrlKey) { scale *= 1 + e.deltaY * (1 - this.zoom_speed) * 0.18 this.ds.changeScale(scale, [e.clientX, e.clientY], false) + } else if (e.shiftKey) { + this.ds.offset[0] -= e.deltaY * 1.18 * (1 / scale) } else { this.ds.offset[0] -= e.deltaX * 1.18 * (1 / scale) this.ds.offset[1] -= e.deltaY * 1.18 * (1 / scale)