Improve stats footer on mobile #296
This commit is contained in:
parent
52be57f5ba
commit
a358aed464
4 changed files with 70 additions and 37 deletions
|
|
@ -1,18 +1,13 @@
|
|||
BR.TrackStats = L.Class.extend({
|
||||
update: function(polyline, segments) {
|
||||
if (segments.length == 0) {
|
||||
$('#distance').html('-');
|
||||
$('#distance').attr('title', '');
|
||||
$('#ascend').html('-');
|
||||
$('#plainascend').html('-');
|
||||
$('#cost').html('-');
|
||||
$('#meancostfactor').html('-');
|
||||
$('#totaltime').html('-');
|
||||
$('#totalenergy').html('-');
|
||||
$('#meanenergy').html('-');
|
||||
$('#stats-container').hide();
|
||||
$('#stats-info').show();
|
||||
return;
|
||||
}
|
||||
|
||||
$('#stats-container').show();
|
||||
$('#stats-info').hide();
|
||||
var stats = this.calcStats(polyline, segments),
|
||||
length1 = L.Util.formatNum(stats.trackLength / 1000, 1).toLocaleString(),
|
||||
length3 = L.Util.formatNum(stats.trackLength / 1000, 3).toLocaleString(undefined, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue