From acb5a687559c03accd2ebafb991f7705d0e76582 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Thu, 25 Apr 2024 10:56:51 +0200 Subject: [PATCH] fix: fix back button in the layer edit form --- umap/static/umap/js/umap.layer.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/umap/static/umap/js/umap.layer.js b/umap/static/umap/js/umap.layer.js index ac93f8ca..8a137e8b 100644 --- a/umap/static/umap/js/umap.layer.js +++ b/umap/static/umap/js/umap.layer.js @@ -1395,9 +1395,17 @@ U.DataLayer = L.Evented.extend({ '_blank' ) } + const button = L.DomUtil.create('li', '') + L.DomUtil.create('i', 'icon icon-16 icon-back', button) + button.title = L._('Back to layers') + // Fixme: remove me when this is merged and released + // https://github.com/Leaflet/Leaflet/pull/9052 + L.DomEvent.disableClickPropagation(button) + L.DomEvent.on(button, 'click', this.map.editDatalayers, this.map) + this.map.editPanel.open({ content: container, - actions: [U.Browser.backButton(this.map)], + actions: [button], }) },