Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Made legend labels ellipsis with tooltip

Taylor Gunnoea6b27e777851
diff --git a/web/css/bank.css b/web/css/bank.css
index dc61d36eb..0daef7523 100644
--- a/web/css/bank.css
+++ b/web/css/bank.css
@@ -85,7 +85,6 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b3ffffff', e
display:block;
width:100%;
margin:0 auto;
- overflow: auto;
}
.bank .category {overflow:hidden;}
.bank h3 {background: none; padding: 1px 3px; font-size:0.9em; margin-top:10px; margin-left:2%;text-transform:uppercase;}
diff --git a/web/css/wv.palettes.css b/web/css/wv.palettes.css
index d48df2ef3..64b6077f8 100644
--- a/web/css/wv.palettes.css
+++ b/web/css/wv.palettes.css
@@ -49,24 +49,29 @@
.wv-palettes-min, .wv-palettes-max{
font-size:0.8em;
white-space:nowrap;
+ max-width: 112px;
+ overflow: hidden;
+ display: inline-block;
+ text-overflow: ellipsis;
}
.layer-hidden .wv-palettes-min, .layer-hidden .wv-palettes-max{
color:#999;
}
.wv-palettes-max {
- float: right;
+ position: absolute;
+ right: 0;
}
/* FIXME: Too specific */
.bank div .wv-palettes-panel {
- padding-left: 3px;
- padding-right: 5px;
- width: auto;
+ padding-left: 3px;
+ padding-right: 5px;
+ width: auto;
}
/* FIXME: Too specific */
.bank div .wv-palettes-colorbar {
- width: 100%;
+ width: 100%;
height: 10px;
border: 1px solid #404040;
cursor: crosshair;
diff --git a/web/js/palettes/wv.palettes.legend.js b/web/js/palettes/wv.palettes.legend.js
index 99f31bbcf..50aa1f4a4 100644
--- a/web/js/palettes/wv.palettes.legend.js
+++ b/web/js/palettes/wv.palettes.legend.js
@@ -72,11 +72,11 @@ wv.palettes.legend = wv.palettes.legend || function(spec) {
$legendPanel.append($colorbar);
var $ranges = $("<div></div>")
- .addClass("wv-palettes-ranges");
+ .addClass("wv-palettes-ranges");
var $min = $("<span></span>")
- .addClass("wv-palettes-min");
+ .addClass("wv-palettes-min");
var $max = $("<span></span>")
- .addClass("wv-palettes-max");
+ .addClass("wv-palettes-max");
$ranges.append($min).append($max);
$legendPanel.append($ranges);
@@ -164,8 +164,12 @@ wv.palettes.legend = wv.palettes.legend || function(spec) {
var palette = model.get(layer.id);
var min = palette.scale.labels[0];
var max = palette.scale.labels[palette.scale.labels.length - 1];
- $(selector + " .wv-palettes-min").html(min);
- $(selector + " .wv-palettes-max").html(max);
+ $(selector + " .wv-palettes-min")
+ .html(min)
+ .attr("title", min);
+ $(selector + " .wv-palettes-max")
+ .html(max)
+ .attr("title", max);
$(selector + " .wv-palettes-center").html("&nbsp;");
};