update frontend
This commit is contained in:
parent
b5babb5d50
commit
e452f360f9
|
|
@ -98,6 +98,15 @@ export function useMapCore(theme) {
|
||||||
map.addControl(new maplibregl.NavigationControl(), "top-right");
|
map.addControl(new maplibregl.NavigationControl(), "top-right");
|
||||||
mapRef.current = map;
|
mapRef.current = map;
|
||||||
|
|
||||||
|
// Close expanded post when clicking on the map (outside markers)
|
||||||
|
map.on("click", () => {
|
||||||
|
const el = expandedElRef.current;
|
||||||
|
if (el && el.__renderCompact) {
|
||||||
|
el.__renderCompact();
|
||||||
|
expandedElRef.current = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
map.on("load", () => {
|
map.on("load", () => {
|
||||||
const vp = getViewFromMap(map);
|
const vp = getViewFromMap(map);
|
||||||
setViewParams(vp);
|
setViewParams(vp);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue