From 9fe744573c39820a067079db4ef7396de208075b Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Fri, 7 Feb 2025 20:33:05 +0100 Subject: [PATCH] feat: add title attribute to layers in browser Usefull when the layer title is truncated because too long. --- umap/static/umap/js/modules/browser.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/umap/static/umap/js/modules/browser.js b/umap/static/umap/js/modules/browser.js index b6bd4c87..b123173e 100644 --- a/umap/static/umap/js/modules/browser.js +++ b/umap/static/umap/js/modules/browser.js @@ -46,7 +46,7 @@ export default class Browser { const symbol = feature._getIconUrl ? Icon.formatUrl(feature._getIconUrl(), feature) : null - title.textContent = feature.getDisplayName() || '—' + title.textContent = title.title = feature.getDisplayName() || '—' const bgcolor = feature.getPreviewColor() colorBox.style.backgroundColor = bgcolor if (symbol && symbol !== U.SCHEMA.iconUrl.default) { @@ -97,7 +97,7 @@ export default class Browser { DomEvent.on(toggle, 'click', toggleList) datalayer.renderToolbox(headline) const name = DomUtil.create('span', 'datalayer-name', headline) - name.textContent = datalayer.options.name + name.textContent = name.title = datalayer.options.name DomEvent.on(name, 'click', toggleList) container.innerHTML = '' datalayer.eachFeature((feature) => this.addFeature(feature, container))