From 6d3a7a6b1c559615bae08dce13aa2ce25f76372f Mon Sep 17 00:00:00 2001 From: Norbert Renner Date: Sat, 27 Jan 2018 11:31:41 +0100 Subject: [PATCH] Restore 3-digit distance title (see #38) removed with PR #56 --- css/style.css | 3 ++- js/control/TrackStats.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/css/style.css b/css/style.css index 1d76a00..ee650d5 100644 --- a/css/style.css +++ b/css/style.css @@ -63,7 +63,8 @@ footer { word-break: break-all; font-weight: bold; } -.stats-label abbr[title] { +.stats-label abbr[title], +#distance { text-decoration: none; border-bottom: 1px dotted #818a91; } diff --git a/js/control/TrackStats.js b/js/control/TrackStats.js index 0af8fa0..4ce8795 100644 --- a/js/control/TrackStats.js +++ b/js/control/TrackStats.js @@ -9,6 +9,8 @@ BR.TrackStats = L.Class.extend({ meanEnergy = stats.trackLength ? L.Util.formatNum(stats.totalEnergy / 36. / stats.trackLength, 2) : ''; $('#distance').html(length1); + // alternative 3-digit format down to meters as tooltip + $('#distance').attr('title', length3 + ' km'); $('#ascend').html(stats.filteredAscend + ' (' + stats.plainAscend +')'); $('#cost').html(stats.cost + ' (' + meanCostFactor + ')'); $('#totaltime').html(formattedTime);