File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -858,12 +858,19 @@ export default function MapContainerFactory(
858858 getCursor ?: ( { isDragging} : { isDragging : boolean } ) => string ;
859859 } = { } ;
860860 if ( primaryMap ) {
861- extraDeckParams . getTooltip = info =>
862- EditorLayerUtils . getTooltip ( info , {
863- editorMenuActive,
864- editor,
865- theme
866- } ) ;
861+ // Omit hover updates when the pointer position is invalid, ie. over UI overlays or
862+ // outside the map container. In those cases x/y may be < 0
863+ extraDeckParams . getTooltip = info => {
864+ const x = Number ( info ?. x ) ;
865+ const y = Number ( info ?. y ) ;
866+ if ( Number . isNaN ( x ) || Number . isNaN ( y ) || x < 0 || y < 0 ) return null ;
867+
868+ return EditorLayerUtils . getTooltip ( info , {
869+ editorMenuActive,
870+ editor,
871+ theme
872+ } ) ;
873+ } ;
867874
868875 extraDeckParams . getCursor = ( { isDragging} : { isDragging : boolean } ) => {
869876 const editorCursor = EditorLayerUtils . getCursor ( {
You can’t perform that action at this time.
0 commit comments