diff --git a/index.css b/index.css index 1b32331f5..d797feae4 100644 --- a/index.css +++ b/index.css @@ -289,9 +289,35 @@ form { vertical-align: middle; } +#filter__selection form { + display: flex; + flex-flow: column; + width: 100%; + background-color: #ffffff; + border-radius: 15px 15px 0 0; + border: none; + font-size: 16px; + transform: translateY(60px); + padding: 15px 0 18px 0; +} + +#filter__selection label { + display: none; +} + +#filter__selection select { + background-color: #F0EFEF; + border: none; + border-radius: 5px; + font-size: 14px; + padding: 5px; + margin: 0 15px; + max-width: 250px; +} + #filter__selection ul { - background-color: white; - border-radius: 15px; + background-color: #ffffff; + border-radius: 0 0 15px 15px; padding: 15px 25px 60px 18px; list-style: none; margin: 0; @@ -316,6 +342,16 @@ form { margin: 0 10px 0 18px; } +.filter__label { + font-size: 16px; + transform: translateY(60px); + background-color: #ffffff; + padding: 0 15px; + margin: 0; + color: #003B8B; + font-weight: 600; +} + #filter__layers { pointer-events: all; list-style: none; diff --git a/index.ts b/index.ts index b78d851f9..2b19f54e7 100644 --- a/index.ts +++ b/index.ts @@ -308,6 +308,8 @@ locationControl.ping(); // --------------- Setting up filter ui -------- +// buttons + const closedFilterButton = ` `; -new CheckBox(new Combine([new LayerSelection(flayers), openFilterButton]), closedFilterButton).AttachTo("filter__selection") - -// --------------- Setting up basemap dropdown -------- +// basemap dropdown let baseLayerOptions = []; Object.entries(BaseLayers.baseLayers).forEach(([key, value], i) => { -console.log(key, value, i); baseLayerOptions.push({value: {name: key, layer: value}, shown: key}); }); -console.log(bm.CurrentLayer.data); +// popup +new CheckBox(new Combine([new DropDown(`label`, baseLayerOptions, bm.CurrentLayer), `
Maplayers
`, new LayerSelection(flayers), openFilterButton]), closedFilterButton).AttachTo("filter__selection") -new DropDown(`label`, baseLayerOptions, bm.CurrentLayer).AttachTo("filter__selection");