File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Sources/Rendering/Core/RenderWindowInteractor Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -421,15 +421,17 @@ function vtkRenderWindowInteractor(publicAPI, model) {
421
421
422
422
//----------------------------------------------------------------------
423
423
publicAPI . requestPointerLock = ( ) => {
424
- const canvas = publicAPI . getView ( ) . getCanvas ( ) ;
425
- canvas . requestPointerLock ( ) ;
424
+ if ( model . container ) {
425
+ model . container . requestPointerLock ( ) ;
426
+ }
426
427
} ;
427
428
428
429
//----------------------------------------------------------------------
429
430
publicAPI . exitPointerLock = ( ) => document . exitPointerLock ( ) ;
430
431
431
432
//----------------------------------------------------------------------
432
- publicAPI . isPointerLocked = ( ) => ! ! document . pointerLockElement ;
433
+ publicAPI . isPointerLocked = ( ) =>
434
+ ! ! model . container && document . pointerLockElement === model . container ;
433
435
434
436
//----------------------------------------------------------------------
435
437
publicAPI . handlePointerLockChange = ( ) => {
You can’t perform that action at this time.
0 commit comments