Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Fix style offset of running-data bar in IE & Edge

Benjamin Kingdc139532fb24
diff --git a/web/css/palettes.css b/web/css/palettes.css
index c728edf0e..b440bd8c4 100644
--- a/web/css/palettes.css
+++ b/web/css/palettes.css
@@ -45,6 +45,9 @@
margin-top: 0;
position: relative;
}
+.bank div .colorbar-case {
+ position: relative;
+}
.wv-palettes-max,
.wv-palettes-min,
@@ -122,7 +125,7 @@
}
.bank div .wv-palettes-panel .wv-running-bar {
- bottom: 15px;
+ top: 0;
width: 1px;
height: 12px;
background: #000;
diff --git a/web/js/map/runningdata.js b/web/js/map/runningdata.js
index 72d17ec11..df7399e54 100644
--- a/web/js/map/runningdata.js
+++ b/web/js/map/runningdata.js
@@ -396,7 +396,7 @@ export function MapRunningData(models) {
marginLeft = 3;
$palette = self.getPalette(id);
- $paletteCase = $palette.parent();
+ $paletteCase = $palette.parent().parent();
$paletteWidth = $palette.width();
$paletteCaseWidth = $paletteCase.outerWidth();
$paletteLabel = $paletteCase.find('.wv-running-label');
diff --git a/web/js/palettes/legend.js b/web/js/palettes/legend.js
index be9424a71..3e28b185e 100644
--- a/web/js/palettes/legend.js
+++ b/web/js/palettes/legend.js
@@ -59,18 +59,22 @@ export function palettesLegend(spec) {
var $container = $('<div></div>')
.addClass('wv-palettes-legend')
.attr('data-index', index);
+ var $colorBarCase = $('<div></div>')
+ .addClass('colorbar-case');
var $colorbar = $('<canvas></canvas>')
.addClass('wv-palettes-colorbar')
.attr('id', legend.id)
.attr('data-index', index);
+ var $runningDataPointBar = $('<div></div>')
+ .addClass('wv-running-bar');
// set fixed canvas dimensions
$colorbar[0].width = 235;
$colorbar[0].height = 12;
+ $colorBarCase
+ .append($colorbar)
+ .append($runningDataPointBar);
+ $container.append($colorBarCase);
- $container.append($colorbar);
-
- var $runningDataPointBar = $('<div></div>')
- .addClass('wv-running-bar');
var $runningDataPointLabel = $('<span></span>')
.addClass('wv-running-label');
@@ -85,8 +89,7 @@ export function palettesLegend(spec) {
$container
.append($min)
.append($max)
- .append($runningDataPointLabel)
- .append($runningDataPointBar);
+ .append($runningDataPointLabel);
$colorbar.on('mousemove', function (e) {
showUnitHover(e, index);