Skip to content

Commit

Permalink
fix(OrbitControls): revert passive wheel (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett authored May 10, 2024
1 parent 0a5de57 commit d0dc70d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/controls/OrbitControls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,12 @@ class OrbitControls extends EventDispatcher {
scope.domElement.addEventListener('contextmenu', onContextMenu)
scope.domElement.addEventListener('pointerdown', onPointerDown)
scope.domElement.addEventListener('pointercancel', onPointerCancel)
scope.domElement.addEventListener('wheel', onMouseWheel, { passive: true })
scope.domElement.addEventListener('wheel', onMouseWheel)
}

this.dispose = (): void => {
// Enabling touch scroll
if (scope.domElement) {
if(scope.domElement) {
scope.domElement.style.touchAction = 'auto'
}
scope.domElement?.removeEventListener('contextmenu', onContextMenu)
Expand Down Expand Up @@ -949,6 +949,8 @@ class OrbitControls extends EventDispatcher {
return
}

event.preventDefault()

// @ts-ignore
scope.dispatchEvent(startEvent)

Expand Down

0 comments on commit d0dc70d

Please sign in to comment.