styling; background map select on bottom; only show layers when there's more than one

This commit is contained in:
Bavo Vanderghote 2020-07-22 17:02:38 +02:00
parent 0f0c3eb8cf
commit 50cc8fd860
2 changed files with 19 additions and 9 deletions

View file

@ -336,6 +336,10 @@ Object.entries(BaseLayers.baseLayers).forEach(([key, value], i) => {
});
// popup
new CheckBox(new Combine([new DropDown(`label`, baseLayerOptions, bm.CurrentLayer), `<p class="filter__label">Maplayers</p>`, new LayerSelection(flayers), openFilterButton]), closedFilterButton).AttachTo("filter__selection")
if (flayers.length > 1) {
new CheckBox(new Combine([`<p class="filter__label">Maplayers</p>`, new LayerSelection(flayers), new DropDown(`Background map`, baseLayerOptions, bm.CurrentLayer), openFilterButton]), closedFilterButton).AttachTo("filter__selection");
} else {
new CheckBox(new Combine([new DropDown(`Background map`, baseLayerOptions, bm.CurrentLayer), openFilterButton]), closedFilterButton).AttachTo("filter__selection");
}