Skip to content

Commit

Permalink
Add close button to tooltip hover (#263)
Browse files Browse the repository at this point in the history
When large number of points and shapes are rendered on
same location, tooltip occasionally is not cleared.
Adding close button will solve this problem.

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
(cherry picked from commit 73be418)
  • Loading branch information
VijayanB authored and github-actions[bot] committed Feb 20, 2023
1 parent 7ce84a2 commit bfb9757
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion public/components/map_container/map_container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ export const MapContainer = ({
hoverPopup = createPopup({
features,
layers: tooltipEnabledLayers,
showCloseButton: false,
// enable close button to avoid occasional dangling tooltip that is not cleared during mouse leave action
showCloseButton: true,
showPagination: false,
showLayerSelection: false,
});
Expand Down
2 changes: 1 addition & 1 deletion public/components/tooltip/create_tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Popup, MapGeoJSONFeature, LngLat } from 'maplibre-gl';

import { MapLayerSpecification, DocumentLayerSpecification } from '../../model/mapLayerType';
import { FeatureGroupItem, TooltipContainer } from './tooltipContainer';
import {MAX_LONGITUDE} from "../../../common";
import { MAX_LONGITUDE } from '../../../common';

interface Options {
features: MapGeoJSONFeature[];
Expand Down

0 comments on commit bfb9757

Please sign in to comment.