Merge pull request #1240 from umap-project/fix-panel-popup

Fix popup panel not opening from the data browser
This commit is contained in:
Yohan Boniface 2023-08-15 07:25:30 +02:00 committed by GitHub
commit 5b867bacfa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -671,6 +671,9 @@ L.U.DataLayer.addInitHook(function () {
L.U.Map.include({ L.U.Map.include({
_openBrowser: function () { _openBrowser: function () {
const browserContainer = L.DomUtil.create('div', 'umap-browse-data') const browserContainer = L.DomUtil.create('div', 'umap-browse-data')
// HOTFIX. Remove when this is merged and released:
// https://github.com/Leaflet/Leaflet/pull/9052
L.DomEvent.disableClickPropagation(browserContainer)
const title = L.DomUtil.add( const title = L.DomUtil.add(
'h3', 'h3',

View file

@ -63,8 +63,8 @@ L.U.Popup.Panel = L.U.Popup.extend({
return button return button
}, },
update: function () { onAdd: function (map) {
this.feature.map.ui.openPanel({ map.ui.openPanel({
data: { html: this._content }, data: { html: this._content },
actions: [this.allButton()], actions: [this.allButton()],
}) })
@ -72,12 +72,9 @@ L.U.Popup.Panel = L.U.Popup.extend({
onRemove: function (map) { onRemove: function (map) {
map.ui.closePanel() map.ui.closePanel()
L.U.Popup.prototype.onRemove.call(this, map)
}, },
_initLayout: function () { update: function () {},
this._container = L.DomUtil.create('span')
},
_updateLayout: function () {}, _updateLayout: function () {},
_updatePosition: function () {}, _updatePosition: function () {},
_adjustPan: function () {}, _adjustPan: function () {},