support panning using wheel

This commit is contained in:
Sanster
2022-04-27 17:25:39 +08:00
parent 390933f0eb
commit bf1e990f00
2 changed files with 23 additions and 2 deletions

View File

@@ -187,3 +187,8 @@ export function isRightClick(ev: SyntheticEvent) {
const mouseEvent = ev.nativeEvent as MouseEvent
return mouseEvent.button === 2
}
export function isMidClick(ev: SyntheticEvent) {
const mouseEvent = ev.nativeEvent as MouseEvent
return mouseEvent.button === 1
}