From d7a6f53225fd39a39e758aa81d6442d4d0787a85 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Mon, 12 Aug 2019 18:09:58 +0200 Subject: [PATCH] infobox margins --- html/script.js | 10 +++++----- html/style.css | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/html/script.js b/html/script.js index a4311b8..29ec53f 100644 --- a/html/script.js +++ b/html/script.js @@ -350,22 +350,22 @@ function init_page() { } }); - /* // this is a little hacky, but the best, most consitent way of doing this. change the margin bottom of the table container to the height of the overlay $('#selected_infoblock').on('resize', function() { $('#sidebar_canvas').css('margin-bottom', $('#selected_infoblock').height() + 'px'); }); // look at the window resize to resize the pop-up infoblock so it doesn't float off the bottom or go off the top $(window).on('resize', function() { - var topCalc = ($(window).height() - $('#selected_infoblock').height() - 60); + var topCalc = ($(window).height() - $('#selected_infoblock').height() - 25); // check if the top will be less than zero, which will be overlapping/off the screen, and set the top correctly. if (topCalc < 0) { topCalc = 0; - $('#selected_infoblock').css('height', ($(window).height() - 60) +'px'); + $('#selected_infoblock').css('height', ($(window).height() - 25) +'px'); } $('#selected_infoblock').css('top', topCalc + 'px'); }); + /* // to make the infoblock responsive $('#sidebar_container').on('resize', function() { if ($('#sidebar_container').width() < 600) { @@ -1752,11 +1752,11 @@ function setSelectedInfoBlockVisibility() { if (planeSelected && mapIsVisible) { $('#selected_infoblock').show(); - //$('#sidebar_canvas').css('margin-bottom', $('#selected_infoblock').height() + 'px'); + $('#sidebar_canvas').css('margin-bottom', $('#selected_infoblock').height() + 'px'); } else { $('#selected_infoblock').hide(); - //$('#sidebar_canvas').css('margin-bottom', 0); + $('#sidebar_canvas').css('margin-bottom', 0); } } diff --git a/html/style.css b/html/style.css index c514930..08483a2 100644 --- a/html/style.css +++ b/html/style.css @@ -11,7 +11,7 @@ html, body { #selected_infoblock { position: absolute; - bottom: 0px !important; + bottom: 0; margin: 0; background: #ffffff; width: 100%;