From d40e69ee4272519e07e5a6a7e3e7f178c3ec0f5b Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 6 Feb 2017 12:23:21 -0600 Subject: [PATCH] Update the location it tries to put the infoblock if it's over the icon --- public_html/script.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public_html/script.js b/public_html/script.js index fdb0da2..59509f2 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -1383,6 +1383,7 @@ function adjustSelectedInfoBlockPosition() { } else { infoBox.css("left", infoBoxOriginalPosition.left); infoBox.css("top", infoBoxOriginalPosition.top); + infoBoxPosition = infoBox.position(); } var infoBoxExtent = getExtent(infoBoxPosition.left, infoBoxPosition.top, infoBox.outerWidth(), infoBox.outerHeight()); @@ -1394,8 +1395,8 @@ function adjustSelectedInfoBlockPosition() { if (isPointInsideExtent(markerPosition[0], markerPosition[1], infoBoxExtent)) { // Array of possible new positions for info box var candidatePositions = []; - candidatePositions.push( { x: 20, y: 20 } ); - candidatePositions.push( { x: 20, y: markerPosition[1] + 40 } ); + candidatePositions.push( { x: 40, y: 60 } ); + candidatePositions.push( { x: 40, y: markerPosition[1] + 80 } ); // Find new position for (var i = 0; i < candidatePositions.length; i++) {