Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Underline on class hover at the moment

Mike McGann668282d8c6cb
diff --git a/src/css/wv.main.css b/src/css/wv.main.css
index b0dbd086f..440146639 100644
--- a/src/css/wv.main.css
+++ b/src/css/wv.main.css
@@ -187,7 +187,8 @@ div.horizontalContainer {width:100%; display:block; float:left; position:absolu
.ui-tooltip {
- background: #FFFBE7;
+ /* background: #FFFBE7; */
+ background: #eee;
}
.ui-tooltip-content {
@@ -257,18 +258,3 @@ label {
* Remove it */
.ui-state-focus:focus { outline: none !important }
.ui-state-focus a:focus { outline: none !important }
-
-/* TEMP: Remove this once the real slider goes in */
-#day-panel {
- position: absolute;
- left: 20em;
- bottom: 5em;
- padding: 1em;
- background-color: rgba(200, 200, 200, 0.8);
- border-radius: 5px;
- border: 1px solid rgb(40, 40, 40);
-}
-
-#day-panel div {
- width: 10em;
-}
diff --git a/src/css/wv.palettes.css b/src/css/wv.palettes.css
index e6c7f9d5a..005462c9f 100644
--- a/src/css/wv.palettes.css
+++ b/src/css/wv.palettes.css
@@ -88,6 +88,10 @@
margin-left: 5px;
}
+.wv-palettes-class-highlight {
+ text-decoration: underline;
+}
+
.bank div .wv-palettes-colorbar[data-type='single'] {
width: 10px;
}
diff --git a/src/js/palettes/wv.palettes.legend.js b/src/js/palettes/wv.palettes.legend.js
index 5d1a47b91..062538c97 100644
--- a/src/js/palettes/wv.palettes.legend.js
+++ b/src/js/palettes/wv.palettes.legend.js
@@ -108,6 +108,7 @@ wv.palettes.legend = wv.palettes.legend || function(spec) {
.append(
$("<span></span>")
.addClass("wv-palettes-class-label")
+ .attr("data-index", index)
.html(palette.classes.labels[index]));
$detailPanel.append($row);
});
@@ -130,7 +131,8 @@ wv.palettes.legend = wv.palettes.legend || function(spec) {
.attr("data-index", index)
.addClass("wv-palettes-class")
.html("&nbsp;")
- .css("background-color", wv.util.hexToRGB(color)));
+ .css("background-color", wv.util.hexToRGB(color))
+ .hover(highlightClass, unhighlightClass));
});
};
@@ -186,6 +188,19 @@ wv.palettes.legend = wv.palettes.legend || function(spec) {
color + "'>" + "</span>" + label);
};
+ var highlightClass = function() {
+ $(".wv-palettes-class-label[data-index='" +
+ $(this).attr("data-index") + "']")
+ .addClass("wv-palettes-class-highlight")
+ };
+
+ var unhighlightClass = function() {
+ $(".wv-palettes-class-label[data-index='" +
+ $(this).attr("data-index") + "']")
+ .removeClass("wv-palettes-class-highlight")
+ };
+
+
init();
return self;
};