Interactive interface for browsing global, full-resolution satellite imagery
add util pickMaxWidth function #1118
Benjamin King5affcbb08f89
diff --git a/web/js/date/util.js b/web/js/date/util.jsindex 6c2390c24..80d1ba6ff 100644--- a/web/js/date/util.js+++ b/web/js/date/util.js@@ -10,3 +10,13 @@ export function timelineDataHightlight(layerId, isActivate) {).classed('data-bar-hovered', false);}}+export function getMaxTimelineWidth(ui) {+ var timeline = ui.timeline;+ var $footer = $('#timeline-footer');+ var $elWidth = $footer.width();+ var $dataWidth = timeline.x(timeline.data.end());+ if ($elWidth > $dataWidth) {+ return $dataWidth;+ }+ return $elWidth;+}