Interactive interface for browsing global, full-resolution satellite imagery
Add minutes to scroll zooming, Tweak date CSS to fit time values
ZachTRicecdf86d086b72
diff --git a/web/css/timeline.css b/web/css/timeline.cssindex b89cc5ca4..1b770b089 100644--- a/web/css/timeline.css+++ b/web/css/timeline.css@@ -131,7 +131,7 @@ g.plot rect.data-bar-invisible {#timeline-header .input-wrapper {background: transparent;border: 1px solid transparent;- vertical-align: middle;+ vertical-align: top;box-sizing: border-box;-webkit-box-sizing: border-box;}@@ -149,9 +149,9 @@ g.plot rect.data-bar-invisible {}#timeline-header input {- height: 40px;+ height: 20px;color: #fff;- font-size: 24px;+ font-size: 20px;background: transparent;border: 0;font-family: 'Roboto Mono', monospace;@@ -160,6 +160,8 @@ 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 {diff --git a/web/js/date/config.js b/web/js/date/config.jsindex 5fce749a4..dc7fc041d 100644--- a/web/js/date/config.js+++ b/web/js/date/config.js@@ -542,13 +542,19 @@ export function timelineConfig(models, config, ui) {case 4: // 10-MinutelabelFormat = d3.time.format.utc('%b');dateInterval = d3.time.day.utc;- tickCount = (tl.data.end() - tl.data.start()) / 1000 / 60 / 60 / 24 / 60;+ // Latest Date minus begin date (Wed Dec 31 1947 19:00:00 GMT-0500 (Eastern Standard Time))+ // Subtracting these leaves miliseconds divide by 1000 = seconds+ // Divide by 60 = Minutes+ // Divide by 60 = Hours - not used+ // Divide by 24 = Days - not used+ // Divide by 1- = 10-minute intervals+ tickCount = (tl.data.end() - tl.data.start()) / 1000 / 60 / 10;tickWidth = 11;tickCountMax = Math.ceil(tl.width / tickWidth);paddedRange = [- new Date(tl.data.start().setUTCDate(tl.data.start().getUTCDate() - 15)),- new Date(tl.data.end().setUTCDate(tl.data.end().getUTCDate() + 15))+ new Date(tl.data.start().setUTCMinutes(tl.data.start().getUTCMinutes() - 10)),+ new Date(tl.data.end().setUTCMinutes(tl.data.end().getUTCMinutes() + 10))];altEnd = new Date(tl.data.start()@@ -556,7 +562,11 @@ export function timelineConfig(models, config, ui) {tl.data.start().getUTCMonth(),tl.data.start()- .getUTCDate() + tickCountMax);+ .getUTCDate(),+ tl.data.start()+ .getUTCHours(),+ tl.data.start()+ .getUTCMinutes() + tickCountMax);tl.zoom.drawTicks(tickCount,tickCountMax,@@ -586,13 +596,13 @@ export function timelineConfig(models, config, ui) {// Calculated next boundary tick by datetl.zoom.current.ticks.boundary.next = function (current) {var next = new Date(current);- return new Date(next.setUTCMonth(next.getUTCMonth() + 1));+ return new Date(next.setUTCHours(next.getUTCHours() + 1));};// Calculated next normal tick by datetl.zoom.current.ticks.normal.next = function (current) {var next = new Date(current);- return new Date(next.setUTCDate(next.getUTCDate() + 1));+ return new Date(next.setUTCMinutes(next.getUTCMinutes() + 60));};// Date of first printed boundary interval of this zoom leveldiff --git a/web/js/date/timeline-zoom.js b/web/js/date/timeline-zoom.jsindex 7c085c493..a998883fe 100644--- a/web/js/date/timeline-zoom.js+++ b/web/js/date/timeline-zoom.js@@ -31,8 +31,8 @@ export function timelineZoom(models, config, ui) {if (zoom < 1) {zoom = 1;}- if (zoom > 3) {- zoom = 3;+ if (zoom > 4) {+ zoom = 4;}tl.config.zoom.call(this, zoom, event);