Use shift instead of ctrl/cmd for horizontal scrolling

This commit is contained in:
Andrew Kingston 2023-04-21 10:49:05 +01:00
parent 4cd5239612
commit be3b2549a5
1 changed files with 1 additions and 4 deletions

View File

@ -29,10 +29,7 @@
// Handles a wheel even and updates the scroll offsets
const handleWheel = e => {
e.preventDefault()
const modifier = e.ctrlKey || e.metaKey
let x = modifier ? e.deltaY : e.deltaX
let y = modifier ? e.deltaX : e.deltaY
debouncedHandleWheel(x, y, e.clientY)
debouncedHandleWheel(e.deltaX, e.deltaY, e.clientY)
}
const debouncedHandleWheel = domDebounce((deltaX, deltaY, clientY) => {
const { top, left } = $scroll