Skip to content

Commit e82542f

Browse files
authored
OrbitControls: Fully migrate to pointer events. (#21972)
* OrbitControls: Fully migrate to pointer events. * OrbitControls: Make use of pointercancel. * Controls: Refactor touchAction setting.
1 parent a816aaf commit e82542f

File tree

6 files changed

+281
-159
lines changed

6 files changed

+281
-159
lines changed

examples/js/controls/DragControls.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
constructor( _objects, _camera, _domElement ) {
2020

2121
super();
22+
_domElement.style.touchAction = 'none'; // disable touch scroll
23+
2224
let _selected = null,
2325
_hovered = null;
2426
const _intersections = []; //
@@ -145,7 +147,6 @@
145147
function onPointerDown() {
146148

147149
if ( scope.enabled === false ) return;
148-
_domElement.style.touchAction = 'none';
149150
updatePointer( event );
150151
_intersections.length = 0;
151152

@@ -192,7 +193,6 @@
192193
}
193194

194195
_domElement.style.cursor = _hovered ? 'pointer' : 'auto';
195-
_domElement.style.touchAction = '';
196196

197197
}
198198

0 commit comments

Comments
 (0)