mirror of
https://github.com/umap-project/umap.git
synced 2025-05-05 14:01:50 +02:00
Factorize about link
This commit is contained in:
parent
1d64ed1bd1
commit
f3e931054c
1 changed files with 9 additions and 8 deletions
|
@ -785,12 +785,8 @@ L.U.Map.include({
|
||||||
L.bind(appendAll, this)()
|
L.bind(appendAll, this)()
|
||||||
L.DomEvent.on(filter, 'input', appendAll, this)
|
L.DomEvent.on(filter, 'input', appendAll, this)
|
||||||
L.DomEvent.on(filter, 'input', resetLayers, this)
|
L.DomEvent.on(filter, 'input', resetLayers, this)
|
||||||
const link = L.DomUtil.create('li', '')
|
|
||||||
L.DomUtil.create('i', 'umap-icon-16 umap-caption', link)
|
this.ui.openPanel({ data: { html: browserContainer }, actions: [this._aboutLink()] })
|
||||||
const label = L.DomUtil.create('span', '', link)
|
|
||||||
label.textContent = label.title = L._('About')
|
|
||||||
L.DomEvent.on(link, 'click', this.displayCaption, this)
|
|
||||||
this.ui.openPanel({ data: { html: browserContainer }, actions: [link] })
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_openFilter: function () {
|
_openFilter: function () {
|
||||||
|
@ -887,7 +883,8 @@ L.U.Map.include({
|
||||||
datalayer.resetLayer(true)
|
datalayer.resetLayer(true)
|
||||||
if (datalayer.hasDataVisible()) found = true
|
if (datalayer.hasDataVisible()) found = true
|
||||||
})
|
})
|
||||||
if (!found) this.ui.alert({content: L._('No results for these filters'), level: 'info'})
|
if (!found)
|
||||||
|
this.ui.alert({ content: L._('No results for these filters'), level: 'info' })
|
||||||
}
|
}
|
||||||
|
|
||||||
propertiesContainer.innerHTML = ''
|
propertiesContainer.innerHTML = ''
|
||||||
|
@ -895,12 +892,16 @@ L.U.Map.include({
|
||||||
L.bind(addProperty, this)(property)
|
L.bind(addProperty, this)(property)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.ui.openPanel({ data: { html: filterContainer }, actions: [this._aboutLink()] })
|
||||||
|
},
|
||||||
|
|
||||||
|
_aboutLink: function () {
|
||||||
const link = L.DomUtil.create('li', '')
|
const link = L.DomUtil.create('li', '')
|
||||||
L.DomUtil.create('i', 'umap-icon-16 umap-caption', link)
|
L.DomUtil.create('i', 'umap-icon-16 umap-caption', link)
|
||||||
const label = L.DomUtil.create('span', '', link)
|
const label = L.DomUtil.create('span', '', link)
|
||||||
label.textContent = label.title = L._('About')
|
label.textContent = label.title = L._('About')
|
||||||
L.DomEvent.on(link, 'click', this.displayCaption, this)
|
L.DomEvent.on(link, 'click', this.displayCaption, this)
|
||||||
this.ui.openPanel({ data: { html: filterContainer }, actions: [link] })
|
return link
|
||||||
},
|
},
|
||||||
|
|
||||||
displayCaption: function () {
|
displayCaption: function () {
|
||||||
|
|
Loading…
Reference in a new issue