Geomap: Fix tooltip bug (#69773)

This commit is contained in:
Nathan Marrs
2023-06-11 13:17:27 +02:00
committed by GitHub
parent cc8bedc173
commit 3f6d55b041

View File

@ -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));