Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Added ability to move pick even if not hovering over timeline (mousedown state)

Taylor Gunnoe80e348d6dc0f
diff --git a/web/css/new-ui.css b/web/css/new-ui.css
index 93551de29..6ac5e5ea5 100644
--- a/web/css/new-ui.css
+++ b/web/css/new-ui.css
@@ -343,11 +343,11 @@ display:inline-block;}
stroke:none;
}
-#guitarpick:hover path{
+#guitarpick:hover path, #guitarpick > .pick-clicked path{
fill:#5E676F;
stroke:#999999;
}
-#guitarpick:hover rect{
+#guitarpick:hover rect, #guitarpick > .pick-clicked rect{
fill:#999999;
}
#timeline-hide .hamburger{
diff --git a/web/js/date/wv.date.timeline.js b/web/js/date/wv.date.timeline.js
index d17792299..8a54912cf 100644
--- a/web/js/date/wv.date.timeline.js
+++ b/web/js/date/wv.date.timeline.js
@@ -1272,17 +1272,17 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
mousedown = true;
d3.event.preventDefault();
d3.event.stopPropagation();
+ guitarPick.classed('pick-clicked',true);
})
.on("mouseup",function(){
mousedown = false;
});
//update date when sliding guitarpick across small axis
- d3.select('#timeline-footer svg').on("mousemove",function(){
+ d3.select(document).on("mousemove",function(){
if (mousedown){
- //window.event.x needed for moving anywhere on document
var newDate;
- var mouseDate = x.invert(d3.mouse(this)[0]);
+ var mouseDate = x.invert((window.event.x-$('#timeline-header').outerWidth()-10));
var currentDate = new Date(model.selected);
switch(zoomLvl){
case 0:
@@ -1329,6 +1329,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
d3.select(document).on("mouseup",function(){
if (mousedown){
mousedown = false;
+ guitarPick.classed('pick-clicked',false);
}
});
////////////////////////////End Timeline/////////////////////////////////////