Interactive interface for browsing global, full-resolution satellite imagery
Move zoom level indicator to above the time step buttons - Create #time-buttons-group wrapping element & move #timeline-zoom and .button-action-group buttons into this element - Adjust timeline width calculation to no longer account #timeline-zoom width - Change #timeline-zoom to be positioned absolutely above the time step buttons
ZachTRice335c6098670a
diff --git a/web/css/timeline.css b/web/css/timeline.cssindex 1b770b089..18f3db17e 100644--- a/web/css/timeline.css+++ b/web/css/timeline.css@@ -149,9 +149,9 @@ g.plot rect.data-bar-invisible {}#timeline-header input {- height: 20px;+ height: 40px;color: #fff;- font-size: 20px;+ font-size: 24px;background: transparent;border: 0;font-family: 'Roboto Mono', monospace;@@ -160,8 +160,6 @@ g.plot rect.data-bar-invisible {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;padding: 0;- text-align: center;- margin-left: -5px;}#timeline-header .input-wrapper:hover {@@ -188,6 +186,11 @@ g.plot rect.data-bar-invisible {display: inline-block;}+#time-buttons-group {+ position: relative;+ width: 86px;+}+.button-action-group,.date-arrows {-webkit-user-select: none;@@ -349,14 +352,19 @@ g.plot rect.data-bar-invisible {}#timeline-zoom {- display: inline-block;- vertical-align: middle;- overflow-y: hidden;- height: 65px;- width: 136px;box-sizing: border-box;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;+ display: inline-block;+ position: absolute;+ bottom: 65px;+ z-index: 9999;+ vertical-align: middle;+ overflow-y: hidden;+ height: 54px;+ width: 100%;+ border-radius: 5px;+ background-color: rgba(40, 40, 40, 0.9);}#timeline-zoom a.zoom-btn {diff --git a/web/index.html b/web/index.htmlindex a611c3a4a..05b862619 100644--- a/web/index.html+++ b/web/index.html@@ -111,34 +111,36 @@ Licensed under the NASA Open Source Agreement, Version 1.3 (http://opensource.gs</div></div><!--/input-wrapper--><div id="focus-guard-2" class="focus-guard" tabindex="5"></div>- <div class="button-action-group" id="left-arrow-group" title="Click and hold to animate backwards">- <svg width="24" height="30">- <path- d="M 10.240764,0 24,15 10.240764,30 0,30 13.759236,15 0,0 10.240764,0 z"- class="arrow"></path>- </svg>- </div>- <div class="button-action-group" id="right-arrow-group" title="Click and hold to animate forwards">- <svg width="24" height="30" >- <path- d="M 10.240764,0 24,15 10.240764,30 0,30 13.759236,15 0,0 10.240764,0 z"- class="arrow"></path>- </svg>+ <div id="time-buttons-group" class="">+ <div id="timeline-zoom">+ <a class="zoom-btn" id="zoom-minutes">Minutes</a>+ <a class="zoom-btn" id="zoom-days">Days</a>+ <a class="zoom-btn" id="zoom-months">Months</a>+ <a class="zoom-btn" id="zoom-years">Years</a>+ </div>+ <div class="button-action-group" id="left-arrow-group" title="Click and hold to animate backwards">+ <svg width="24" height="30">+ <path+ d="M 10.240764,0 24,15 10.240764,30 0,30 13.759236,15 0,0 10.240764,0 z"+ class="arrow"></path>+ </svg>+ </div>+ <div class="button-action-group" id="right-arrow-group" title="Click and hold to animate forwards">+ <svg width="24" height="30" >+ <path+ d="M 10.240764,0 24,15 10.240764,30 0,30 13.759236,15 0,0 10.240764,0 z"+ class="arrow"></path>+ </svg>+ </div></div><div class="button-action-group animate-button" id="animate-button" title="Set up animation"><i id="wv-animate" class="fa fa-video-camera wv-animate"></i></div>- </div> <!--/timeline-header-->+ </div><div id="timeline-footer"><div id="wv-animation-widet-case"> </div>- </div><!--/timeline-footer-->- <div id="timeline-zoom">- <a class="zoom-btn" id="zoom-minutes">Minutes</a>- <a class="zoom-btn" id="zoom-days">Days</a>- <a class="zoom-btn" id="zoom-months">Months</a>- <a class="zoom-btn" id="zoom-years">Years</a>- </div><!--/timeline-zoom-->+ </div><div id="timeline-hide"><svg class="hamburger" width="10" height="9"><path d="M 0,0 0,1 10,1 10,0 0,0 z M 0,4 0,5 10,5 10,4 0,4 z M 0,8 0,9 10,9 10,8 0,8 z"></path>diff --git a/web/js/date/timeline.js b/web/js/date/timeline.jsindex 762ff666d..0d31e7eab 100644--- a/web/js/date/timeline.js+++ b/web/js/date/timeline.js@@ -25,8 +25,6 @@ export function timeline(models, config, ui) {.outerWidth(true) -$('#timeline-header').outerWidth(true) -- $('#timeline-zoom')- .outerWidth(true) -$('#timeline-hide').outerWidth(true) -self.margin.left - self.margin.right - 2;@@ -39,12 +37,10 @@ export function timeline(models, config, ui) {self.toggle = function (now) {var tl = $('#timeline-footer');- var tlz = $('#timeline-zoom');var tlg = self.boundary;var gp = d3.select('#guitarpick');if (tl.is(':hidden')) {var afterShow = function () {- tlz.show();$('#timeline').css('right', '10px');tlg.attr('style', 'clip-path:url("#timeline-boundary")');@@ -59,7 +55,6 @@ export function timeline(models, config, ui) {} else {tlg.attr('style', 'clip-path:none');gp.attr('style', 'display:none;clip-path:none');- tlz.hide();tl.hide('slow');$('#timeline').css('right', 'auto');@@ -68,7 +63,7 @@ export function timeline(models, config, ui) {self.expand = function (now) {now = now || false;- var tl = $('#timeline-footer, #timeline-zoom');+ var tl = $('#timeline-footer');if (tl.is(':hidden')) {self.toggle(now);}@@ -79,7 +74,7 @@ export function timeline(models, config, ui) {};self.collapse = function (now) {- var tl = $('#timeline-footer, #timeline-zoom');+ var tl = $('#timeline-footer');if (!tl.is(':hidden')) {self.toggle(now);}