update frontend

This commit is contained in:
Your Name 2025-12-13 02:16:44 -05:00
parent b5babb5d50
commit e452f360f9
1 changed files with 9 additions and 0 deletions

View File

@ -98,6 +98,15 @@ export function useMapCore(theme) {
map.addControl(new maplibregl.NavigationControl(), "top-right");
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", () => {
const vp = getViewFromMap(map);
setViewParams(vp);