Interactive interface for browsing global, full-resolution satellite imagery
merge
Taylor Gunnoeb91e915a79b9
diff --cc .gitignoreindex c75ba6cc2,1a2cf12e5..5c2cac817--- a/.gitignore+++ b/.gitignore@@@ -11,4 -11,4 +11,5 @@@ tool*~*.swpoptions- \#*++\#*+ npm-debug.logdiff --cc src/js/date/wv.date.timeline.jsindex 320033c93,09c42cad4..ae68d1222--- a/src/js/date/wv.date.timeline.js+++ b/src/js/date/wv.date.timeline.js@@@ -492,102 -441,9 +520,104 @@@ wv.date.timeline = wv.date.timeline ||}});+ $("#timeline-zoom").hover(function(e){+ $("#timeline footer").css("background","rgba(40,40,40,0.9)");+ },function(e){+ $("#timeline footer").css("background","");+ });+ $("#timeline-zoom input").on("input",function(e){+ var testZoomLevel = $(this).val();+ if (zoomLevel != testZoomLevel){+ switch(testZoomLevel){+ case '0':+ zoomScale = 1;+ break;++ case '1':+ zoomScale = 2;+ break;+ case '2':+ zoomScale = 4;+ break;+ case '3':+ zoomScale = 20;+ break;+ case '4':+ zoomScale = 60;+ break;+ default:+ console.log("Doesn't work");+ }+ //console.log(zoom.scale());+ zoomLevel = testZoomLevel;+ zoom.scale(zoomScale);+ tx = Math.min(0, width * (1 - zoomScale));+ ty = Math.min(0, height * (1 - zoomScale));+ zoom.translate([tx, ty]);+ redrawAxis();+ var firstTickZ = svg.select(".x.axis .tick:nth-child(2) text");+ var firstTickDataZ = firstTickZ.data()[0];+ console.log(firstTickZ);+ if ((zoomScale === 20) || (zoomScale === 60)){+ console.log("Correct" + firstTickDataZ.getUTCMonth());+ svg.select(".x.axis .first text").text(firstTickDataZ.getUTCFullYear() ++ " " + monthNames[firstTickDataZ.getUTCMonth()]);+ }+ else{++ svg.select(".x.axis .first text").text(firstTickDataZ.getUTCFullYear());++ }+ }+ });+ $("#timeline-hide").click(function(e){+ var tl = $("#timeline footer");+ if(tl.is(":hidden"))+ {+ tl.show("slow");+ $("#timeline-zoom input").show();+ $("#timeline-hide").text("Hide Timeline");+ $("#timeline-zoom").css("right","10px");+ $("#timeline-zoom").css("left","auto");+ $("#now-line").show();++ }+ else{+ tl.hide("slow");+ $("#timeline-zoom input").hide();+ $("#timeline-hide").text("Show Timeline");+ $("#timeline-zoom").css("left","183px");+ $("#timeline-zoom").css("right","auto");+ $("#now-line").hide();+ }++ });++ $("#day-input-group").blur();+}; // /init+ var incrementZoom = function(){++ };+ var zoomable = function(e){+ var tempVal;+ var sliderVal = parseInt($("#timeline-zoom input").val());++ var evt = window.event || d3.event.sourceEvent || e;+ var delta=evt.deltaY ? evt.deltaY : evt.wheelDeltaY || evt.detail ? evt.detail*(-120) : evt.wheelDelta;+ if (delta < 0){++ tempVal = sliderVal + 1;+ }+ else{+ tempVal = sliderVal - 1;+ }+ if ((tempVal >= 0) && (tempVal <= 4)){+ $("#timeline-zoom input").val(tempVal).trigger("input");+ }+ else+ return;+ };var bindTimelineMouseMove = function() {var mouse_x = d3.mouse(this)[0];var graph_x = x.invert(mouse_x);@@@ -655,6 -513,8 +685,10 @@@}//remove selection when clicking too fast//document.getSelection().removeAllRanges();++++ // Don't grab focus to allow arrow keys to work++//$('.button-input-group-selected').select();data2[0].date = model.selected.getTime();data2[1].date = data2[0].date;