diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-07-15 16:18:14 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-07-15 16:18:14 +0200 |
| commit | 14075c7c744bb80da7f25c28f8c4f1322f30a69e (patch) | |
| tree | 2974d8cf142a96e5b620b306f24f9698b120959c /ishtar_common/templates/gis/openlayers-osm.html | |
| parent | 1bcb570b463370ad1375c395f0f23b204a2dba0e (diff) | |
| download | Ishtar-14075c7c744bb80da7f25c28f8c4f1322f30a69e.tar.bz2 Ishtar-14075c7c744bb80da7f25c28f8c4f1322f30a69e.zip | |
✨ Find: add the ability to configure a "+ find without context" button
Diffstat (limited to 'ishtar_common/templates/gis/openlayers-osm.html')
| -rw-r--r-- | ishtar_common/templates/gis/openlayers-osm.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ishtar_common/templates/gis/openlayers-osm.html b/ishtar_common/templates/gis/openlayers-osm.html index 4ed773a33..59969210a 100644 --- a/ishtar_common/templates/gis/openlayers-osm.html +++ b/ishtar_common/templates/gis/openlayers-osm.html @@ -35,8 +35,11 @@ groupSelectStyle: 'children' }); {{ module }}.map.addControl(layer_switcher); - $(".ol-viewport").parent().width($(".form").width()); - $(document).ready(function() { + {% comment %}$(".ol-viewport").parent().width($(".form").width());{% endcomment %} + let ol_viewport = document.querySelector(".ol-viewport"); + if (ol_viewport.parent) ol_viewport.parent().width(document.querySelector(".form").width()); + {% comment %}$(document).ready(function() { {% endcomment %} + document.addEventListener("DOMContentLoaded", function() { {{ module }}.map.updateSize(); let features = {{ module }}.featureOverlay.getSource().getFeatures(); if (features.length){ |
