Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions InputfieldMapMarker.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,23 @@ var InputfieldMapMarker = {
}
return true;
});

// added by diogo to solve the problem of maps not rendering correctly in hidden elements
// trigger a resize on the map when either the tab button or the toggle field bar are pressed
$(document).ready(function() {

// get the tab element where this map is integrated
$tab = $('#_' + $(map.b).closest('.InputfieldFieldsetTabOpen').attr('id'));
// get the inputfield where this map is integrated and add the tab to the stack
$inputFields = $(map.b).closest('.Inputfield').find('.InputfieldStateToggle').add($tab);

$inputFields.on('click',function(){
// give it time to open
window.setTimeout(function(){
google.maps.event.trigger(map,'resize');
}, 200);
});
});

}
};
Expand Down