Skip to content
Snippets Groups Projects
Commit 3c3e0848 authored by Elijah Byrd's avatar Elijah Byrd
Browse files

Some small fixes to marker detection from last commit. The performance...

Some small fixes to marker detection from last commit. The performance improvements in this branch now seem to be working perfectly.
parent 2defc1c8
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -345,10 +345,16 @@
var bounds = accessible_gmaps.map.getBounds();
for(var i = 0; i < accessible_gmaps.markers.length; i++){
var marker = accessible_gmaps.markers[i];
var markerID = "mkr-" + i;
// If marker is not in bounds, hide the overlay.
if(!bounds.contains(marker.getPosition())){
var markerID = "mkr-" + i;
jQuery('div#' + markerID).css('display', 'none');
}
// If the marker is in bounds, position the overlay off-screen. This will keep it from receiving incorrect mouse hover, until it is repositioned by its marker's hover or its own focus event.
else {
jQuery('div#' + markerID).css('left', '-2000px');
jQuery('div#' + markerID).css('top', '-2000px');
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment