Skip to content

Commit

Permalink
Fixes #12 - Popup doesn't work correctly in some scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
HarelM committed Mar 13, 2024
1 parent 485b913 commit 006d324
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/popup-on-click.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@
});
map.addControl(new maplibregl.NavigationControl());
map.addControl(new MaplibreInspect({
showMapPopup: true,
showMapPopupOnHover: false,
showInspectMapPopupOnHover: false
showMapPopup: true,
showMapPopupOnHover: false,
showInspectMapPopupOnHover: true,
blockHoverPopupOnClick: true,
}));
</script>

Expand Down
1 change: 1 addition & 0 deletions lib/MaplibreInspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ class MaplibreInspect implements IControl {

public toggleInspector() {
this._showInspectMap = !this._showInspectMap;
this._popupBlocked = false;
this.options.toggleCallback(this._showInspectMap);
this.render();
}
Expand Down

0 comments on commit 006d324

Please sign in to comment.