This commit is contained in:
Steve Ruiz 2022-09-08 11:13:29 +01:00
parent b56a3a6982
commit 00e17b65f3

View file

@ -37,7 +37,7 @@ export function useZoomEvents<T extends HTMLElement>(
const [x, y, z] = normalizeWheel(e)
// alt+scroll or ctrl+scroll = zoom
if ((e.altKey || e.ctrlKey || e.metaKey) && e.buttons === 1) {
if ((e.altKey || e.ctrlKey || e.metaKey) && e.buttons === 0) {
const point = inputs.pointer?.point ?? [bounds.width / 2, bounds.height / 2]
const delta = [...point, z * 0.618]
const info = inputs.pan(delta, e)