Skip to content

Commit 3039b45

Browse files
authored
add shift + scroll to pan horizontally (#1164)
1 parent 7802213 commit 3039b45

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/LGraphCanvas.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3224,6 +3224,8 @@ export class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasEventMap>
32243224
} else if (e.ctrlKey) {
32253225
scale *= 1 + e.deltaY * (1 - this.zoom_speed) * 0.18
32263226
this.ds.changeScale(scale, [e.clientX, e.clientY], false)
3227+
} else if (e.shiftKey) {
3228+
this.ds.offset[0] -= e.deltaY * 1.18 * (1 / scale)
32273229
} else {
32283230
this.ds.offset[0] -= e.deltaX * 1.18 * (1 / scale)
32293231
this.ds.offset[1] -= e.deltaY * 1.18 * (1 / scale)

0 commit comments

Comments
 (0)