Zeile 15: |
Zeile 15: |
| * fixes #36 | | * fixes #36 |
| */ | | */ |
− | $( document ).ready(function() { | + | $(document).ready(function() { |
− | $('.tabs-tabbox .tabs-header').click(function(e) {
| + | $('.tabs-label').click(function(e) { |
− | setTimeout(function() {
| + | var mapExists = setInterval(function() { |
− | window.maps.leafletList.forEach(function(l) {
| + | var counter = 0; |
− | l.map.invalidateSize(false);
| + | var mapsLeafletList = window.mapsLeafletList; |
− | });
| + | if (mapsLeafletList && mapsLeafletList.length) { |
− | }, 100);
| + | mapsLeafletList.forEach(function(l) { |
− | });
| + | if (l.map) { |
| + | l.map.invalidateSize(false); |
| + | clearInterval(mapExists); |
| + | } |
| + | }); |
| + | } |
| + | if (counter++ > 10) clearInterval(mapExists); |
| + | }, 100); |
| + | }); |
| }); | | }); |