From 50cc8fd86069f665dcdf90b1e917260e527a19f0 Mon Sep 17 00:00:00 2001 From: Bavo Vanderghote Date: Wed, 22 Jul 2020 17:02:38 +0200 Subject: [PATCH] styling; background map select on bottom; only show layers when there's more than one --- index.css | 22 ++++++++++++++-------- index.ts | 6 +++++- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/index.css b/index.css index d797feae4..712afd594 100644 --- a/index.css +++ b/index.css @@ -294,18 +294,24 @@ form { flex-flow: column; width: 100%; background-color: #ffffff; - border-radius: 15px 15px 0 0; + border-radius: 15px; border: none; font-size: 16px; transform: translateY(60px); - padding: 15px 0 18px 0; + padding: 15px 0 60px 0; } #filter__selection label { - display: none; + font-size: 16px; + background-color: #ffffff; + padding: 0 15px 12px 15px; + margin: 0; + color: #003B8B; + font-weight: 600; } #filter__selection select { + outline: none; background-color: #F0EFEF; border: none; border-radius: 5px; @@ -317,12 +323,11 @@ form { #filter__selection ul { background-color: #ffffff; - border-radius: 0 0 15px 15px; - padding: 15px 25px 60px 18px; + padding: 10px 25px 18px 18px; list-style: none; margin: 0; font-weight: 600; - transform: translateY(60px); + transform: translateY(75px); } #filter__selection ul li span > span { @@ -344,12 +349,13 @@ form { .filter__label { font-size: 16px; - transform: translateY(60px); + transform: translateY(75px); background-color: #ffffff; - padding: 0 15px; + padding: 10px 15px; margin: 0; color: #003B8B; font-weight: 600; + border-radius: 15px 15px 0 0; } #filter__layers { diff --git a/index.ts b/index.ts index 2b19f54e7..9b971aea9 100644 --- a/index.ts +++ b/index.ts @@ -336,6 +336,10 @@ Object.entries(BaseLayers.baseLayers).forEach(([key, value], i) => { }); // popup -new CheckBox(new Combine([new DropDown(`label`, baseLayerOptions, bm.CurrentLayer), `

Maplayers

`, new LayerSelection(flayers), openFilterButton]), closedFilterButton).AttachTo("filter__selection") +if (flayers.length > 1) { + new CheckBox(new Combine([`

Maplayers

`, 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"); +}