Fixed marker-cluster position

This commit is contained in:
PxlLoewe
2025-04-29 21:22:02 -07:00
parent 8d41bdc938
commit 8e79c27444
4 changed files with 24 additions and 36 deletions

View File

@@ -26,7 +26,6 @@ export const calculateAnchor = (
mode: "popup" | "marker",
options?: { ignoreMarker?: boolean; ignoreCluster?: boolean },
) => {
console.log("calculateAnchor", id, mode, options);
const otherMarkers = document.querySelectorAll(".map-collision");
// get markers and check if they are overlapping
const ownMarker =
@@ -52,8 +51,6 @@ export const calculateAnchor = (
);
});
if (id.includes("13")) console.log(ownMarker, marksersInCluster);
// get the center of all overlapping markers
const markersPosition = marksersInCluster.map((marker) => {
const rect = (marker as HTMLElement).getBoundingClientRect();