Merge pull request #1775 from umap-project/fix-layer-back

fix: fix back button in the layer edit form
This commit is contained in:
Yohan Boniface 2024-04-26 16:58:06 +02:00 committed by GitHub
commit 4ca1450cc6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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],
})
},