Commit 64033713 authored by Byrd's avatar Byrd
Browse files

Properly handle non-visible markers

parent c9ec95f3
Pipeline #16015 skipped
......@@ -297,6 +297,14 @@ function accessible_gmaps_infowindows_trapTabKey(object,evt, markerIndex) {
*/
function accessible_gmaps_resetMarker(markerIndex){
marker = markers[markerIndex];
var markerID = "mkr-" + markerIndex;
// If marker isn't visible, hide the div and move on.
if(!marker.getVisible()){
jQuery('div#' + markerID).css('display', 'none');
return;
}
var offset = accessible_gmaps_getMarkerPos(marker);
// These values should be adjusted based on your marker size.
......@@ -306,7 +314,6 @@ function accessible_gmaps_resetMarker(markerIndex){
var mapWidth = jQuery(mapIdentifier).width();
var mapHeight = jQuery(mapIdentifier).height();
var markerID = "mkr-" + markerIndex;
var markerWidth = jQuery('div#' + markerID).width();
var markerHeight = jQuery('div#' + markerID).height();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment