did something with markers
This commit is contained in:
@@ -58,6 +58,7 @@ export const calculateAnchor = (
|
||||
y: rect.top + rect.height / 2,
|
||||
};
|
||||
});
|
||||
|
||||
const ownMarkerBounds = (ownMarker as HTMLElement).getBoundingClientRect();
|
||||
const ownMarkerPosition = {
|
||||
x: ownMarkerBounds.left + ownMarkerBounds.width / 2,
|
||||
@@ -75,6 +76,12 @@ export const calculateAnchor = (
|
||||
centerOfOverlappingMarkers.x /= markersPosition.length;
|
||||
centerOfOverlappingMarkers.y /= markersPosition.length;
|
||||
|
||||
if (id == "2") {
|
||||
console.log("markersInCluser", marksersInCluster);
|
||||
console.log("ownMarkerPosition", ownMarkerPosition);
|
||||
console.log("centerOfOverlappingMarkers", centerOfOverlappingMarkers);
|
||||
}
|
||||
|
||||
if (marksersInCluster.length > 1) {
|
||||
if (centerOfOverlappingMarkers.y < ownMarkerPosition.y) {
|
||||
if (centerOfOverlappingMarkers.x > ownMarkerPosition.x) {
|
||||
|
||||
Reference in New Issue
Block a user