Interactive interface for browsing global, full-resolution satellite imagery
Animation dialog UI is done, but it only animates one day
Edmond Lee7a654fd661a8
diff --git a/web/css/menuPicker.css b/web/css/menuPicker.cssindex 24d6cdcd5..95173c050 100644--- a/web/css/menuPicker.css+++ b/web/css/menuPicker.css@@ -1,21 +1,21 @@-ul.menuPicker {- margin: 0;- padding: 0;- color: white;- list-style: none;- display: block;-}--ul.menuPicker li {- border: 1px solid black;- background: #666;- padding: .2em 1em;-}--ul.menuPicker li:hover {- background: #9B1C26;-}--ul.menuPicker li.disabled {- background: #999;+ul.menuPicker {+ margin: 0;+ padding: 0;+ color: white;+ list-style: none;+ display: block;+}++ul.menuPicker li {+ border: 1px solid black;+ background: #666;+ padding: .2em 1em;+}++ul.menuPicker li:hover {+ background: #9B1C26;+}++ul.menuPicker li.disabled {+ background: #999;}\ No newline at end of filediff --git a/web/css/wv.date.css b/web/css/wv.date.cssindex 6871259a3..dca578494 100644--- a/web/css/wv.date.css+++ b/web/css/wv.date.css@@ -9,6 +9,21 @@* All Rights Reserved.*/+/* css for animation dialog*/+.wv-header { /* header */+ margin-top: 1em;+ font-size: 14px;+ margin-bottom: 1em;+}++.wv-label-opacity { /*label*/+ text-align: right;+}++.noUi-target { /* slider */+ margin: 10px 10px 10px 15px;+}+#timeds, #timemds {position: relative;}diff --git a/web/index.html b/web/index.htmlindex 18563988e..0ff65b317 100644--- a/web/index.html+++ b/web/index.html@@ -17,6 +17,43 @@<title>@OFFICIAL_NAME@</title><meta http-equiv="X-UA-Compatible" content="IE=edge">+ <style>+ .demoHeaders {+ margin-top: 2em;+ }+ #dialog-link {+ padding: .4em 1em .4em 10px;+ text-decoration: none;+ position: relative;+ }+ #dialog-link span.ui-icon {+ margin: 0 5px 0 0;+ position: absolute;+ left: .2em;+ top: 50%;+ margin-top: -8px;+ }+ #icons {+ margin: 0;+ padding: 0;+ }+ #icons li {+ margin: 2px;+ position: relative;+ padding: 4px 0;+ cursor: pointer;+ float: left;+ list-style: none;+ }+ #icons span.ui-icon {+ float: left;+ margin: 0 4px;+ }+ .fakewindowcontain .ui-widget-overlay {+ position: absolute;+ }+ </style>+<script type="text/javascript">if ( /MSIE (\d+\.\d+);/.test(navigator.userAgent) && ! /unsupported/.test(location.search) ) {var version = parseFloat(navigator.appVersion.split("MSIE")[1]);@@ -220,6 +257,11 @@<div id="imagedownload"></div><div id="dlMap"></div>+ <!-- ui-dialog -->+ <div id="dialog" title="Dialog Title">++ </div>+<div id="timewheels" style="display:none"></div><section id="timeline" style="display: none">@@ -279,6 +321,13 @@class="arrow"></path></svg></div>+ <div class="button-action-group" id="animate-arrow-group" title="Start animation">+ <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> <!--/timeline-header--><div id="timeline-footer">diff --git a/web/js/date/wv.date.timeline.input.js b/web/js/date/wv.date.timeline.input.jsindex c9c34ff4e..051931e88 100644--- a/web/js/date/wv.date.timeline.input.js+++ b/web/js/date/wv.date.timeline.input.js@@ -36,6 +36,7 @@ wv.date.timeline.input = wv.date.timeline.input || function(models, config, ui)var $incrementBtn = $("#right-arrow-group");var $decrementBtn = $("#left-arrow-group");+ var $animateBtn = $("#animate-arrow-group");var forwardNextDay = function(){ //FIXME: Limit animation correctlyvar nextDay = new Date(new Date(model.selected)@@ -269,6 +270,60 @@ wv.date.timeline.input = wv.date.timeline.input || function(models, config, ui)}).mouseup(animateEnd);+ $animateBtn.click(function(event) {+ $("#dialog").dialog("open");+ event.preventDefault();+ });++ //Add slider and html elements to dialog area+ var $header = $("<div></div>")+ .html("Days")+ .addClass("wv-header");++ var $slider = $("<div></div>")+ .noUiSlider({+ start: animDuration,+ step: 1,+ range: {+ min: 0,+ max: 14+ }+ }).on("slide", function() {+ animDuration = $slider.val();+ $label.html(parseFloat(animDuration));+ });++ var $label = $("<div></div>")+ .html(animDuration)+ .addClass("wv-label")+ .addClass("wv-label-opacity");++ $("#dialog").append($header).append($slider).append($label)+ .dialog({+ autoOpen: false,+ dialogClass: "wv-panel",+ title: "Play Animation",+ width: 300,+ show: { effect: "slide", direction: "down" },+ position: {+ my: "left bottom",+ at: "left top",+ of: $("#timeline-footer")+ },+ buttons: [+ {+ text: "Animate",+ click: function() {+ doAnimation = true;+ animSpeed = 100;+ animDuration = parseFloat($slider.val());+ $( this ).dialog( "close" );+ animateReverse("day");+ }+ }+ ]+ });+$(document).mouseout(animateEnd).keydown(function(event) {