From bf2e9dc175a988305f3592e0a17b7888b8da5ef2 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Wed, 23 Apr 2025 11:33:12 +0200 Subject: [PATCH] chore: remove call to DomUtil.createIcon in umap.js --- umap/static/umap/js/modules/umap.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/umap/static/umap/js/modules/umap.js b/umap/static/umap/js/modules/umap.js index e7a98085..cd7ca8f9 100644 --- a/umap/static/umap/js/modules/umap.js +++ b/umap/static/umap/js/modules/umap.js @@ -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 = ` +
+

${translate('Manage layers')}

+ +
+ ` + 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( + `
  • ` + ) 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]