Made Mission marker DB compatible

This commit is contained in:
PxlLoewe
2025-04-24 22:32:18 -07:00
parent 46cbdf6bb9
commit 5bca37182d
22 changed files with 445 additions and 187 deletions

View File

@@ -16,7 +16,7 @@ export const useSmartPopup = () => {
return context;
};
export const useConflict = (id: string, mode: "popup" | "marker") => {
export const calculateAnchor = (id: string, mode: "popup" | "marker") => {
const otherMarkers = document.querySelectorAll(".map-collision");
// get markers and check if they are overlapping
const ownMarker =
@@ -105,7 +105,7 @@ export const SmartPopup = (
>("topleft");
const handleConflict = () => {
const newAnchor = useConflict(id, "popup");
const newAnchor = calculateAnchor(id, "popup");
setAnchor(newAnchor);
};