Oberflächenadministratoren, SMW-Administratoren, SMW-Kuratoren, SMW-Editoren, Oversighter, Administratoren, Widget-Bearbeiter
1.217
Bearbeitungen
K (fix #36) |
K (fix #36) |
||
Zeile 157: | Zeile 157: | ||
* fixes #36 | * fixes #36 | ||
*/ | */ | ||
$( document ).ready(function() { | $(document).ready(function() { | ||
$('.tabs-label').click(function(e) { | |||
console.log("[mapResize] click tabs-label"); | |||
var mapExists = setInterval(function() { | |||
var counter = 0; | |||
console.log("[mapResize] couter:", counter); | |||
const mapsLeafletList = window.mapsLeafletList; | |||
if (mapsLeafletList && mapsLeafletList.length) { | |||
mapsLeafletList.forEach(l => { | |||
if (l.map) { | |||
console.log("[mapResize] invalidateSize"); | |||
l.map.invalidateSize(false); | |||
clearInterval(mapExists); | |||
} | |||
}); | |||
} | |||
if (counter++ > 10) { | |||
console.warn("[mapResize] watchdog exit, couter:", counter); | |||
clearInterval(mapExists); | |||
} | |||
}, 100); | |||
}); | |||
}); | }); |
Bearbeitungen