mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 11:32:38 +02:00
chore: remove call to DomUtil.createIcon in umap.js
This commit is contained in:
parent
3f5d282477
commit
bf2e9dc175
1 changed files with 11 additions and 5 deletions
|
@ -1512,12 +1512,17 @@ export default class Umap {
|
|||
|
||||
editDatalayers() {
|
||||
if (!this.editEnabled) return
|
||||
const container = DomUtil.create('div')
|
||||
DomUtil.createTitle(container, translate('Manage layers'), 'icon-layers')
|
||||
const ul = DomUtil.create('ul', '', container)
|
||||
const template = `
|
||||
<div>
|
||||
<h3><i class="icon icon-16 icon-layers"></i>${translate('Manage layers')}</h3>
|
||||
<ul data-ref=ul></ul>
|
||||
</div>
|
||||
`
|
||||
const [container, { ul }] = Utils.loadTemplateWithRefs(template)
|
||||
this.eachDataLayerReverse((datalayer) => {
|
||||
const row = DomUtil.create('li', 'orderable', ul)
|
||||
DomUtil.createIcon(row, 'icon-drag', translate('Drag to reorder'))
|
||||
const row = Utils.loadTemplate(
|
||||
`<li class="orderable"><i class="icon icon-16 icon-drag" title="${translate('Drag to reorder')}"></i></li>`
|
||||
)
|
||||
datalayer.renderToolbox(row)
|
||||
const builder = new MutatingForm(
|
||||
datalayer,
|
||||
|
@ -1528,6 +1533,7 @@ export default class Umap {
|
|||
row.appendChild(form)
|
||||
row.classList.toggle('off', !datalayer.isVisible())
|
||||
row.dataset.id = datalayer.id
|
||||
ul.appendChild(row)
|
||||
})
|
||||
const onReorder = (src, dst, initialIndex, finalIndex) => {
|
||||
const movedLayer = this.datalayers[src.dataset.id]
|
||||
|
|
Loading…
Reference in a new issue