From 39efce09ab670a9cbc967173642a967fa1ddb5ce Mon Sep 17 00:00:00 2001 From: Roipoussiere Date: Mon, 23 Oct 2023 14:21:45 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20[Bug=20fixes]=20fix=20UI=20bug?= =?UTF-8?q?=20when=20customizing=20intervention=20map=20style=20(#3800)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/changelog.rst | 1 + geotrek/maintenance/static/maintenance/main.js | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index c7f0eebb10..a836603bed 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -10,6 +10,7 @@ CHANGELOG **Bug fixes** +- Fix UI bug when customizing intervention map style (#3800) - Fix Aggregator fails when updating Tour steps order (#3793) - Fix services list display error (refs ##3795) diff --git a/geotrek/maintenance/static/maintenance/main.js b/geotrek/maintenance/static/maintenance/main.js index 44c5414e25..7444366dea 100644 --- a/geotrek/maintenance/static/maintenance/main.js +++ b/geotrek/maintenance/static/maintenance/main.js @@ -10,10 +10,13 @@ $(window).on('entity:map', function (e, data) { var map = data.map; // Show infrastructure layer in application maps - var layer = new L.ObjectsLayer(null, { - modelname: modelname, - style: L.Util.extend(window.SETTINGS.map.styles[modelname] || {}, { clickable:false }), - }); + var style = L.Util.extend({ clickable: false }, + window.SETTINGS.map.styles[modelname] || {}); + + var layer = new L.ObjectsLayer(null, { + modelname: modelname, + style: style, + }); if (data.modelname != modelname){ map.layerscontrol.addOverlay(layer, tr('Intervention'), tr('Maintenance'));