Skip to content

Commit

Permalink
fix legend overlap
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-mcgann authored and ZachTRice committed Jun 26, 2018
1 parent 0c0f55e commit d561f96
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Empty file modified tasks/buildCSS.js 100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion web/css/palettes.css
Expand Up @@ -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;
Expand Down
9 changes: 5 additions & 4 deletions web/js/map/runningdata.js
Expand Up @@ -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;
};
Expand Down

0 comments on commit d561f96

Please sign in to comment.