File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ class ModifyControl extends Control {
359
359
return ;
360
360
}
361
361
const newCursor = this . cursorStyleHandler ( cursor ) ;
362
- const element = this . map . getTargetElement ( ) ;
362
+ const element = this . map . getViewport ( ) ;
363
363
if (
364
364
( element . style . cursor || newCursor ) &&
365
365
element . style . cursor !== newCursor
@@ -403,15 +403,15 @@ class ModifyControl extends Control {
403
403
addListeners ( ) {
404
404
this . removeListeners ( ) ;
405
405
this . cursorListenerKeys = [
406
- this . map ?. on ( 'pointerdown' , ( ) => {
407
- const element = this . map . getTargetElement ( ) ;
406
+ this . map ?. on ( 'pointerdown' , ( evt ) => {
407
+ const element = evt . map . getViewport ( ) ;
408
408
if ( element ?. style ?. cursor === 'grab' ) {
409
409
this . changeCursor ( 'grabbing' ) ;
410
410
}
411
411
} ) ,
412
412
this . map ?. on ( 'pointermove' , this . cursorHandlerThrottled ) ,
413
- this . map ?. on ( 'pointerup' , ( ) => {
414
- const element = this . map . getTargetElement ( ) ;
413
+ this . map ?. on ( 'pointerup' , ( evt ) => {
414
+ const element = evt . map . getViewport ( ) ;
415
415
if ( element ?. style ?. cursor === 'grabbing' ) {
416
416
this . changeCursor ( 'grab' ) ;
417
417
}
You can’t perform that action at this time.
0 commit comments