Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fix legend overlap

Mike McGannd561f962ab34
diff --git a/tasks/buildCSS.js b/tasks/buildCSS.js
old mode 100644
new mode 100755
diff --git a/web/css/palettes.css b/web/css/palettes.css
index 2f4af7d11..a4dd1b8cf 100644
--- a/web/css/palettes.css
+++ b/web/css/palettes.css
@@ -67,7 +67,8 @@
.wv-palettes-max,
.wv-palettes-min,
-.wv-palettes-title {
+.wv-palettes-title,
+.wv-running-label {
white-space: nowrap;
overflow: hidden;
display: inline-block;
diff --git a/web/js/map/runningdata.js b/web/js/map/runningdata.js
index fd671661e..25d872f23 100644
--- a/web/js/map/runningdata.js
+++ b/web/js/map/runningdata.js
@@ -96,11 +96,12 @@ export function MapRunningData(models) {
*
*/
self.getLabelMarginLeft = function (labelWidth, caseWidth, location, marginLeft) {
+ const padding = 5;
var offsetLeft = location + marginLeft - (labelWidth / 2);
- if (offsetLeft + labelWidth > caseWidth) {
- offsetLeft = caseWidth - labelWidth;
- } else if (offsetLeft < 5) {
- offsetLeft = 5;
+ if (offsetLeft + labelWidth + padding > caseWidth) {
+ offsetLeft = caseWidth - labelWidth - padding;
+ } else if (offsetLeft < padding) {
+ offsetLeft = padding;
}
return offsetLeft;
};