Interactive interface for browsing global, full-resolution satellite imagery
Center running data label #67
Benjamin Kingc43bad70204f
diff --git a/web/css/palettes.css b/web/css/palettes.cssindex 7f9b3186f..a6a54ebc9 100644--- a/web/css/palettes.css+++ b/web/css/palettes.css@@ -51,7 +51,7 @@.wv-palettes-title,.wv-running-category-label,.wv-running-label {- font-size: 0.7em;+ font-size: 10px;bottom: 0;width: auto;}@@ -77,7 +77,7 @@.layer-hidden .wv-running-category-label,.layer-hidden .wv-running-label {color: #999;- font-size: 0.7em;+ font-size: 10px;}.wv-palettes-title {diff --git a/web/js/components/sidebar/paletteLegend.js b/web/js/components/sidebar/paletteLegend.jsindex 55195aef9..aedeaa26b 100644--- a/web/js/components/sidebar/paletteLegend.js+++ b/web/js/components/sidebar/paletteLegend.js@@ -99,7 +99,7 @@ class PaletteLegend extends React.Component {if (util.hexColorDelta(legend.colors[i], hex) < acceptableDifference) {// If the two colors are closereturn {- label: legend.tooltips[i] + ' ' + units,+ label: units ? legend.tooltips[i] + ' ' + units : legend.tooltips[i],len: len,index: i};@@ -212,7 +212,7 @@ class PaletteLegend extends React.Component {} else if (xOffset + halfTextWidth > width) {return { right: '0' };}- return { left: xOffset - halfTextWidth + 'px' };+ return { left: Math.floor(xOffset - halfTextWidth) + 'px' };}/**@@ -231,7 +231,7 @@ class PaletteLegend extends React.Component {legendObj = this.getLegendObject(legend, colorHex, 5); // {label,len,index}if (legendObj) {percent = this.getPercent(legendObj.len, legendObj.index);- textWidth = util.getTextWidth(legendObj.label, 'Lucida Sans');+ textWidth = util.getTextWidth(legendObj.label, '10px Open Sans');xOffset = Math.floor(this.state.width * percent);}}