[v10.0.x] Geomap: Fix tooltip bug (#69881)

Geomap: Fix tooltip bug (#69773)

(cherry picked from commit 3f6d55b041)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
This commit is contained in:
Grot (@grafanabot)
2023-06-11 14:29:53 +03:00
committed by GitHub
co-authored by Nathan Marrs
parent f7766f73b8
commit 9288017ffe
@@ -32,9 +32,12 @@ export const pointerMoveListener = (evt: MapBrowserEvent<MouseEvent>, panel: Geo
if (panel.state.measureMenuActive) {
return true;
}
if (!panel.map || panel.state.ttipOpen) {
// Eject out of this function if map is not loaded or valid tooltip is already open
if (!panel.map || (panel.state.ttipOpen && panel.state?.ttip?.layers?.length)) {
return false;
}
const mouse = evt.originalEvent;
const pixel = panel.map.getEventPixel(mouse);
const hover = toLonLat(panel.map.getCoordinateFromPixel(pixel));