summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-02-15 18:48:00 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-04-16 16:41:51 +0200
commit523f49aea73ef213d2eb0dab0a43af8dce3699ce (patch)
tree606c64d66e124db5e01e30d7b21fb4b4d9d8ed14
parent792f32ef4068a5c4265e1b6dfadb5683cfe2ed73 (diff)
downloadIshtar-523f49aea73ef213d2eb0dab0a43af8dce3699ce.tar.bz2
Ishtar-523f49aea73ef213d2eb0dab0a43af8dce3699ce.zip
🐛 force refresh of map behind tabs
-rw-r--r--ishtar_common/static/js/ishtar-map.js6
-rw-r--r--ishtar_common/templates/ishtar/sheet.html4
2 files changed, 10 insertions, 0 deletions
diff --git a/ishtar_common/static/js/ishtar-map.js b/ishtar_common/static/js/ishtar-map.js
index 3ee41e2d1..8e6bd3c05 100644
--- a/ishtar_common/static/js/ishtar-map.js
+++ b/ishtar_common/static/js/ishtar-map.js
@@ -977,4 +977,10 @@ const register_zoom_on_map = function(){
return false;
}
)
+}
+
+var update_all_map_display = function(){
+ for (idx in map){
+ map[idx].updateSize()
+ }
} \ No newline at end of file
diff --git a/ishtar_common/templates/ishtar/sheet.html b/ishtar_common/templates/ishtar/sheet.html
index 49c06b0a6..a32ee2862 100644
--- a/ishtar_common/templates/ishtar/sheet.html
+++ b/ishtar_common/templates/ishtar/sheet.html
@@ -123,6 +123,10 @@
});
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
$(e.target).resize(); // fix table header refresh for datatable
+ let target = $(e.target).attr("aria-controls");
+ if ($("#" + target + " .ol-viewport").length){
+ update_all_map_display();
+ }
})
});
{% endlocalize %}</script>