From 9d9be8fd260d3f4a66f3e84685f05128f09feaa5 Mon Sep 17 00:00:00 2001 From: vershwal Date: Sun, 18 Mar 2018 17:17:28 +0530 Subject: [PATCH 1/2] Added button to close Map controls. --- css/80_app.css | 4 ++-- modules/ui/background.js | 5 +++++ modules/ui/help.js | 5 +++++ modules/ui/map_data.js | 5 +++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/css/80_app.css b/css/80_app.css index 0150828af..99354558e 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -2727,12 +2727,12 @@ div.full-screen > button:hover { position: fixed; top: 60px; bottom: 30px; - padding: 20px 50px 20px 20px; + padding: 5px 35px 5px 5px; right: 0; overflow: auto; } [dir='rtl'] .map-overlay.content { - padding: 20px 20px 20px 50px; + padding: 5px 5px 5px 35px; left: 0; right: auto !important; } diff --git a/modules/ui/background.js b/modules/ui/background.js index 295c44530..e4da9c745 100644 --- a/modules/ui/background.js +++ b/modules/ui/background.js @@ -350,6 +350,11 @@ export function uiBackground(context) { .call(svgIcon('#icon-layers', 'light')) .call(paneTooltip); + pane + .append('button') + .on('click', function() { uiBackground.hidePane(); }) + .call(svgIcon('#icon-close')); + pane .append('h2') .text(t('background.title')); diff --git a/modules/ui/help.js b/modules/ui/help.js index 30d17833a..43f9d7b44 100644 --- a/modules/ui/help.js +++ b/modules/ui/help.js @@ -382,6 +382,11 @@ export function uiHelp(context) { .call(tooltipBehavior); var shown = false; + pane + .append('button') + .on('click', function() { uiHelp.hidePane(); }) + .call(svgIcon('#icon-close')); + var toc = pane .append('ul') diff --git a/modules/ui/map_data.js b/modules/ui/map_data.js index 457a43be5..6b5c268c6 100644 --- a/modules/ui/map_data.js +++ b/modules/ui/map_data.js @@ -457,6 +457,11 @@ export function uiMapData(context) { .call(paneTooltip); + pane + .append('button') + .on('click', function() { uiMapData.hidePane(); }) + .call(svgIcon('#icon-close')); + pane .append('h2') .text(t('map_data.title')); From 64b90a6a92c41c5a283e1cf660f39e79f9fbb908 Mon Sep 17 00:00:00 2001 From: vershwal Date: Sun, 18 Mar 2018 19:36:46 +0530 Subject: [PATCH 2/2] Changed padding. --- css/80_app.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css/80_app.css b/css/80_app.css index 99354558e..435437f53 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -2727,12 +2727,12 @@ div.full-screen > button:hover { position: fixed; top: 60px; bottom: 30px; - padding: 5px 35px 5px 5px; + padding: 2px 50px 20px 20px; right: 0; overflow: auto; } [dir='rtl'] .map-overlay.content { - padding: 5px 5px 5px 35px; + padding: 2px 20px 20px 50px; left: 0; right: auto !important; }