mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix: do not show browser counter when layer is empty or not loaded
fix #2215
This commit is contained in:
parent
e0812afea8
commit
d8383dafba
1 changed files with 1 additions and 0 deletions
|
@ -98,6 +98,7 @@ export default class Browser {
|
|||
datalayer.eachFeature((feature) => this.addFeature(feature, container))
|
||||
|
||||
const total = datalayer.count()
|
||||
if (!total) return
|
||||
const current = container.querySelectorAll('li').length
|
||||
const count = total === current ? total : `${current}/${total}`
|
||||
const counter = DomUtil.create('span', 'datalayer-counter', headline)
|
||||
|
|
Loading…
Reference in a new issue