From 50e8161b8959c8eff09d283f0a89b8a38274103b Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 26 Dec 2023 12:08:20 +0100 Subject: [PATCH] Rename var in popup.js --- umap/static/umap/js/umap.popup.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/umap/static/umap/js/umap.popup.js b/umap/static/umap/js/umap.popup.js index f4289fde..c30c03a9 100644 --- a/umap/static/umap/js/umap.popup.js +++ b/umap/static/umap/js/umap.popup.js @@ -270,17 +270,17 @@ L.U.PopupTemplate.OSM = L.U.PopupTemplate.Default.extend({ const color = this.feature.getDynamicOption('color') title.style.backgroundColor = color const iconUrl = this.feature.getDynamicOption('iconUrl') - let img + let icon if (L.Util.isPath(iconUrl) || L.Util.isRemoteUrl(iconUrl) || L.Util.isDataImage(iconUrl)) { - img = L.DomUtil.add('img', 'popup-icon', title) - img.src = iconUrl + icon = L.DomUtil.add('img', 'popup-icon', title) + icon.src = iconUrl } else { - img = L.DomUtil.add('span', 'popup-icon', title) - img.textContent = iconUrl + icon = L.DomUtil.add('span', 'popup-icon', title) + icon.textContent = iconUrl } if (L.DomUtil.contrastedColor(title, color)) { if (L.Util.isPath(iconUrl) && iconUrl.endsWith('.svg')) { - img.style.filter = 'invert(1)' + icon.style.filter = 'invert(1)' } title.style.color = 'white' }