Interactive interface for browsing global, full-resolution satellite imagery
Fix sidebar footer positioning
ZachTRicea6716b71b15f
diff --git a/web/css/sidebar.css b/web/css/sidebar.cssindex 9a1d3b665..36bbff1ab 100644--- a/web/css/sidebar.css+++ b/web/css/sidebar.css@@ -23,7 +23,6 @@padding: 5px 0 0;position: relative;border: 1px solid transparent;- margin-bottom: 36px;}#productsHolder ul#overlays {@@ -31,7 +30,7 @@}#productsHolder footer {- bottom: -36px;+ bottom: 0;padding: 2px 5px 5px;position: absolute;background-color: transparent;@@ -83,3 +82,15 @@#productsHolder .ps__scrollbar-y {background: #ccc;}++#productsHolder #products {+ padding-bottom: 36px;+}++#productsHolder #wv-events {+ padding-bottom: 83px;+}++#productsHolder #wv-data {+ padding-bottom: 36px;+}diff --git a/web/js/data/ui.js b/web/js/data/ui.jsindex c3e0e9ec4..f7927b55b 100644--- a/web/js/data/ui.js+++ b/web/js/data/ui.js@@ -178,18 +178,25 @@ export function dataUi(models, ui, config) {var footerHeight = $tabFooter.outerHeight(true);var distanceFromTop = $('#productsHolder').offset().top;var timelineHeight = $('#timeline').outerHeight(true);+ var tabPadding = $tabPanel.outerHeight(true) - $tabPanel.height();// FIXME: -10 here is the timeline's bottom position from page, fix// after timeline markup is corrected to be loaded first- var maxHeight = windowHeight - tabBarHeight - footerHeight - distanceFromTop - timelineHeight - 10 - 5;+ var maxHeight = windowHeight - tabBarHeight - distanceFromTop - tabPadding + footerHeight;+ var innerMaxHeight = windowHeight - tabBarHeight - distanceFromTop - tabPadding - footerHeight;++ if (!util.browser.small) {+ maxHeight = maxHeight - timelineHeight - 10 - 5;+ }+$tabPanel.css('max-height', maxHeight);var childrenHeight = $('#wv-datacontent').outerHeight(true);- var isTallerThanContainer = childrenHeight > maxHeight;+ var isTallerThanContainer = childrenHeight > innerMaxHeight;if (isTallerThanContainer) {- $('.wv-datalist').css('height', maxHeight).css('padding-right', '10px');+ $('.wv-datalist').css('height', innerMaxHeight).css('padding-right', '10px');if (productsIsOverflow) {$('.wv-datalist').perfectScrollbar('update');} else {diff --git a/web/js/layers/active.js b/web/js/layers/active.jsindex 476ca9850..16770636b 100644--- a/web/js/layers/active.js+++ b/web/js/layers/active.js@@ -302,7 +302,9 @@ export function layersActive(models, ui, config) {var baseLayersHeight = $('#baselayers').outerHeight(true);var layerGroupHeight = 26; // Height of layer group titlesvar contentHeight = overlaysHeight + baseLayersHeight + layerGroupHeight;- var maxHeight;+ var tabPadding = $tabPanel.outerHeight(true) - $tabPanel.height();+ var maxHeight = windowHeight - tabBarHeight - distanceFromTop - tabPadding + footerHeight;+ var innerMaxHeight = windowHeight - tabBarHeight - distanceFromTop - tabPadding - footerHeight;// If on a mobile device, use the native scroll barsif (!util.browser.small) {@@ -318,16 +320,12 @@ export function layersActive(models, ui, config) {// after timeline markup is corrected to be loaded firstif (util.browser.small) {maxHeight = windowHeight - tabBarHeight - footerHeight - distanceFromTop - 10 - 5;- } else {- // FIXME: Hack, the timeline sometimes renders twice as large of a height and- // creates a miscalculation here for timelineHeight- maxHeight = windowHeight - tabBarHeight - footerHeight - distanceFromTop - /* timelineHeight */ 67 - 10 - 5;}$tabPanel.css('max-height', maxHeight);- if ((maxHeight <= contentHeight)) {- $('.layer-container').css('height', maxHeight).css('padding-right', '10px');+ if ((innerMaxHeight <= contentHeight)) {+ $('.layer-container').css('height', innerMaxHeight).css('padding-right', '10px');$('.layer-container').perfectScrollbar();if (productsIsOverflow === false) productsIsOverflow = true;} else {diff --git a/web/js/layers/sidebar.js b/web/js/layers/sidebar.jsindex 4d59634a3..56fd585c9 100644--- a/web/js/layers/sidebar.js+++ b/web/js/layers/sidebar.js@@ -131,12 +131,13 @@ export function layersSidebar(models, config) {var distanceFromTop = $('#productsHolder').offset().top;var timelineHeight = $('#timeline').outerHeight(true);var footerHeight = footerIsVisible ? $tabFooter.outerHeight(true) : 0;- $tabPanel.css('padding-bottom', footerHeight);var tabPadding = $tabPanel.outerHeight(true) - $tabPanel.height();// FIXME: -10 here is the timeline's bottom position from page, fix// after timeline markup is corrected to be loaded first- var maxHeight = windowHeight - tabBarHeight - distanceFromTop - tabPadding;+ var maxHeight = windowHeight - tabBarHeight - distanceFromTop - tabPadding + footerHeight;+ var innerMaxHeight = windowHeight - tabBarHeight - distanceFromTop - tabPadding - footerHeight;+if (!util.browser.small) {maxHeight = maxHeight - timelineHeight - 10 - 5;}@@ -145,8 +146,8 @@ export function layersSidebar(models, config) {var childrenHeight = $('#wv-eventscontent').outerHeight(true);- if ((maxHeight <= childrenHeight)) {- $('.wv-eventslist').css('height', maxHeight).css('padding-right', '10px');+ if ((innerMaxHeight <= childrenHeight)) {+ $('.wv-eventslist').css('height', innerMaxHeight).css('padding-right', '10px');if (productsIsOverflow) {$('.wv-eventslist').perfectScrollbar('update');} else {