Css tweaking

This commit is contained in:
Pieter Vander Vennet 2020-07-23 16:28:19 +02:00
parent 2e7b14061f
commit ef593654f4
6 changed files with 33 additions and 47 deletions

View file

@ -224,18 +224,20 @@ for (const key in BaseLayers.baseLayers) {
baseLayerOptions.push({value: {name: key, layer: BaseLayers.baseLayers[key]}, shown: key});
}
const backgroundMapPicker = new Combine([new DropDown(`Background map`, baseLayerOptions, bm.CurrentLayer), openFilterButton]);
const layerSelection = new Combine([`<p class="filter__label">Maplayers</p>`, new LayerSelection(flayers)]);
let layerControl = backgroundMapPicker;
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");
layerControl = new Combine([layerSelection, backgroundMapPicker);
}
new CheckBox(layerControl, closedFilterButton).AttachTo("filter__selection");
// ------------------ Setup various UI elements ------------
new StrayClickHandler(bm, selectedElement, fullScreenMessage, () => {
return new SimpleAddUI(bm.Location,
bm.LastClickLocation,
@ -304,9 +306,6 @@ new FullScreenMessageBoxHandler(fullScreenMessage, () => {
selectedElement.setData(undefined)
}).update();
// fullScreenMessage.setData(generateWelcomeMessage());
new CenterMessageBox(
minZoom,
centerMessage,