Hauptmenü öffnen
Start
Zufall
In der Nähe
Karten
Letzte Änderungen
Neueste Dateien
Anmelden
Einstellungen
Über FürthWiki
Impressum
Förderverein
Kontakt
FürthWiki
Suchen
Änderungen
← Zum vorherigen Versionsunterschied
Zum nächsten Versionsunterschied →
MediaWiki:Common.js
(Quelltext anzeigen)
Version vom 5. Mai 2021, 19:50 Uhr
322 Bytes hinzugefügt
,
19:50, 5. Mai 2021
K
fix #36
Zeile 159:
Zeile 159:
$( document ).ready(function() {
$( document ).ready(function() {
$('.tabs-label').click(function(e) {
$('.tabs-label').click(function(e) {
−
setTimeout
(function() {
+
var mapExists = setInterval
(function() {
−
const maplist = window.mapsLeafletList;
+
var counter = 0;
−
if (maplist) maplist.forEach(l => {
+
console.log("[mapResize] couter:", counter);
−
if (l.map) l.map.invalidateSize(false);
+
const maplist = window.mapsLeafletList;
−
});
+
if (maplist)
{
−
},
200
);
+
maplist.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
);
});
});
});
});
DelphiN
Oberflächenadministratoren
,
SMW-Administratoren
,
SMW-Kuratoren
,
SMW-Editoren
,
Oversighter
,
Administratoren
,
Widget-Bearbeiter
1.193
Bearbeitungen