Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Added data bar highlight on layer hover

Taylor Gunnoefe2fc1aefb9d
diff --git a/web/js/date/wv.date.timeline.js b/web/js/date/wv.date.timeline.js
index e11be1e6d..d6870792f 100644
--- a/web/js/date/wv.date.timeline.js
+++ b/web/js/date/wv.date.timeline.js
@@ -92,14 +92,14 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
activeLayersTitles = [];
activeLayers = models.layers.get();
-
+ /*
activeLayersDynamic = activeLayers.filter(function(al){
return al.startDate;
});
activeLayersInvisible = activeLayers.filter(function(al){
return al.visible === false;
});
-
+ */
layerCount = activeLayers.length;
$(activeLayers).each(function(i){
@@ -142,6 +142,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
.attr('y',y(layerId)-2.5)
.attr('rx',4)
.attr('ry',4)
+ .attr('data-layer',layerId)
.attr("class", "data-bar");
// .attr("d", selection);
if(!staticLayer){
diff --git a/web/js/layers/wv.layers.active.js b/web/js/layers/wv.layers.active.js
index 85e4a4b80..f0c8eed33 100644
--- a/web/js/layers/wv.layers.active.js
+++ b/web/js/layers/wv.layers.active.js
@@ -194,6 +194,15 @@ wv.layers.active = wv.layers.active || function(models, ui, config) {
.append($('<p></p>').html(names.subtitle));
wv.ui.mouse.click(mainLayerDiv, toggleOptionsPanel);
+ $layer.hover(function(){
+ d3.select('#timeline-footer svg g.plot rect[data-layer="'+ layer.id +'"]')
+ .classed('data-bar-hovered',true);
+
+ },function(){
+ d3.select('#timeline-footer svg g.plot rect[data-layer="'+ layer.id +'"]')
+ .classed('data-bar-hovered',false);
+ });
+
$layer.append(mainLayerDiv);
if ( layer.palette ) {