Skip to content

Commit

Permalink
feat: add title attribute to layers in browser
Browse files Browse the repository at this point in the history
Usefull when the layer title is truncated because too long.
  • Loading branch information
yohanboniface committed Feb 10, 2025
1 parent 815ff04 commit 9fe7445
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions umap/static/umap/js/modules/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 9fe7445

Please sign in to comment.