mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix: do not show tooltip with only spaces
Co-authored-by: David Larlet <david@larlet.fr>
This commit is contained in:
parent
ba20f5791c
commit
48daa0a77f
1 changed files with 3 additions and 3 deletions
|
@ -335,15 +335,15 @@ class Feature {
|
||||||
// Variables mode.
|
// Variables mode.
|
||||||
if (labelKey) {
|
if (labelKey) {
|
||||||
if (Utils.hasVar(labelKey)) {
|
if (Utils.hasVar(labelKey)) {
|
||||||
return Utils.greedyTemplate(labelKey, this.extendedProperties())
|
return Utils.greedyTemplate(labelKey, this.extendedProperties()).trim()
|
||||||
}
|
}
|
||||||
keys.unshift(labelKey)
|
keys.unshift(labelKey)
|
||||||
}
|
}
|
||||||
for (const key of keys) {
|
for (const key of keys) {
|
||||||
const value = this.properties[key]
|
const value = this.properties[key]
|
||||||
if (value) return value
|
if (value) return value.trim()
|
||||||
}
|
}
|
||||||
return this.datalayer.getName()
|
return this.datalayer.getName().trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
hasPopupFooter() {
|
hasPopupFooter() {
|
||||||
|
|
Loading…
Reference in a new issue