commit c6d347cb43e50e39c8f744e25bad6956349e2e37
parent 0cad968b042c91cb1270b65a7a8840abc9d0b3d3
Author: myadzel <myadzel@gmail.com>
Date: Wed, 19 Nov 2025 20:11:40 +0300
change distance rounding precision (issue #1370)
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/lib/leaflet.control.elevation-profile/index.js b/src/lib/leaflet.control.elevation-profile/index.js
@@ -395,14 +395,13 @@ const ElevationProfile = L.Class.extend({
),
ascent: Math.round(stats.ascent),
descent: Math.round(stats.descent),
- dist: (stats.distance / 1000).toFixed(1),
startApprox: stats.dataLostAtStart > 0.02 ? '~ ' : '',
endApprox: stats.dataLostAtEnd > 0.02 ? '~ ' : '',
approx: stats.dataLost > 0.02 ? '~ ' : '',
incomplete: stats.dataLost > 0.02 ? 'Some elevation data missing' : '',
};
}
- d.dist = (stats.distance / 1000).toFixed(1);
+ d.dist = (stats.distance / 1000).toFixed(2);
this.propsContainer.innerHTML = `
<table>