Oberflächenadministratoren, SMW-Administratoren, SMW-Kuratoren, SMW-Editoren, Oversighter, Administratoren, Widget-Bearbeiter
1.219
Bearbeitungen
K (Reinitialize leaflet after each tab change. fixes #36) Markierungen: Mobile Bearbeitung Mobile Web-Bearbeitung |
(fix #36) |
||
Zeile 15: | Zeile 15: | ||
* fixes #36 | * fixes #36 | ||
*/ | */ | ||
$( document ).ready(function() { | $(document).ready(function() { | ||
$('.tabs-label').click(function(e) { | |||
var mapExists = setInterval(function() { | |||
var counter = 0; | |||
var mapsLeafletList = window.mapsLeafletList; | |||
if (mapsLeafletList && mapsLeafletList.length) { | |||
mapsLeafletList.forEach(function(l) { | |||
if (l.map) { | |||
l.map.invalidateSize(false); | |||
clearInterval(mapExists); | |||
} | |||
}); | |||
} | |||
if (counter++ > 10) clearInterval(mapExists); | |||
}, 100); | |||
}); | |||
}); | }); |
Bearbeitungen