File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 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 {
359359 return ;
360360 }
361361 const newCursor = this . cursorStyleHandler ( cursor ) ;
362- const element = this . map . getTargetElement ( ) ;
362+ const element = this . map . getViewport ( ) ;
363363 if (
364364 ( element . style . cursor || newCursor ) &&
365365 element . style . cursor !== newCursor
@@ -403,15 +403,15 @@ class ModifyControl extends Control {
403403 addListeners ( ) {
404404 this . removeListeners ( ) ;
405405 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 ( ) ;
408408 if ( element ?. style ?. cursor === 'grab' ) {
409409 this . changeCursor ( 'grabbing' ) ;
410410 }
411411 } ) ,
412412 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 ( ) ;
415415 if ( element ?. style ?. cursor === 'grabbing' ) {
416416 this . changeCursor ( 'grab' ) ;
417417 }
You can’t perform that action at this time.
0 commit comments