Skip to content

Commit

Permalink
Always display 3 digits for distance title, even when ending with zeros
Browse files Browse the repository at this point in the history
  • Loading branch information
bagage committed May 24, 2020
1 parent 3122a17 commit 6376857
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/control/TrackStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ BR.TrackStats = L.Class.extend({

var stats = this.calcStats(polyline, segments),
length1 = L.Util.formatNum(stats.trackLength / 1000, 1).toLocaleString(),
length3 = L.Util.formatNum(stats.trackLength / 1000, 3).toLocaleString(),
length3 = L.Util.formatNum(stats.trackLength / 1000, 3).toLocaleString(undefined, {
minimumFractionDigits: 3
}),
formattedAscend = stats.filteredAscend.toLocaleString(),
formattedPlainAscend = stats.plainAscend.toLocaleString(),
formattedCost = stats.cost.toLocaleString(),
Expand Down

0 comments on commit 6376857

Please sign in to comment.