Zeile 158: |
Zeile 158: |
| */ | | */ |
| $(document).ready(function() { | | $(document).ready(function() { |
− | console.log("document ready!");
| |
− | console.dir("tabs-label:", $('.tabs-label'));
| |
| $('.tabs-label').click(function(e) { | | $('.tabs-label').click(function(e) { |
− | console.log("[mapResize] click tabs-label");
| |
| var mapExists = setInterval(function() { | | var mapExists = setInterval(function() { |
| var counter = 0; | | var counter = 0; |
− | console.log("[mapResize] couter:", counter);
| |
| var mapsLeafletList = window.mapsLeafletList; | | var mapsLeafletList = window.mapsLeafletList; |
| if (mapsLeafletList && mapsLeafletList.length) { | | if (mapsLeafletList && mapsLeafletList.length) { |
| mapsLeafletList.forEach(function(l) { | | mapsLeafletList.forEach(function(l) { |
| if (l.map) { | | if (l.map) { |
− | console.log("[mapResize] invalidateSize");
| |
| l.map.invalidateSize(false); | | l.map.invalidateSize(false); |
| clearInterval(mapExists); | | clearInterval(mapExists); |
Zeile 175: |
Zeile 170: |
| }); | | }); |
| } | | } |
− | if (counter++ > 10) { | + | if (counter++ > 10) clearInterval(mapExists); |
− | console.warn("[mapResize] watchdog exit, couter:", counter);
| |
− | clearInterval(mapExists);
| |
− | }
| |
| }, 100); | | }, 100); |
| }); | | }); |
| }); | | }); |