Skip to content

Commit f90e4ef

Browse files
committed
[input] suppot zoom even when shift is down
1 parent 82b8210 commit f90e4ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/website/verse/Input.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ export class Input extends System {
118118
if (e.repeat) return
119119
if (this.isInputFocused()) return
120120
const code = e.code
121-
// console.log(code)
122121
const meta = e.metaKey
123122
const ctrl = e.ctrlKey
124123
const shift = e.shiftKey
@@ -216,8 +215,9 @@ export class Input extends System {
216215

217216
onWheel = e => {
218217
e.preventDefault()
218+
const delta = e.shiftKey ? e.deltaX : e.deltaY
219219
for (const control of this.controls) {
220-
if (control.handler.zoom?.(e.deltaY)) {
220+
if (control.handler.zoom?.(delta)) {
221221
break
222222
}
223223
}

0 commit comments

Comments
 (0)