Skip to content

Commit

Permalink
fix(OrbitControls): restore touchAction on dispose
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitskvmdam committed Apr 27, 2024
1 parent c61652b commit e1f6d3e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/controls/OrbitControls.ts
Expand Up @@ -413,6 +413,10 @@ class OrbitControls extends EventDispatcher {
}

this.dispose = (): void => {
// Enabling touch scroll
if(scope.domElement) {
scope.domElement.style.touchAction = 'auto'
}
scope.domElement?.removeEventListener('contextmenu', onContextMenu)
scope.domElement?.removeEventListener('pointerdown', onPointerDown)
scope.domElement?.removeEventListener('pointercancel', onPointerCancel)
Expand Down

0 comments on commit e1f6d3e

Please sign in to comment.