Made Mission marker DB compatible
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user