From b585d3b22f505a8f9a84d69e58501eb97cd9aee1 Mon Sep 17 00:00:00 2001 From: cr3a7ure Date: Wed, 1 Nov 2023 21:31:33 +0200 Subject: [PATCH] feat(centimeters): Display decimals on meters - When measuering with meters, display two decimals to indicate centimeter distances --- Leaflet.PolylineMeasure.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Leaflet.PolylineMeasure.js b/Leaflet.PolylineMeasure.js index 0e659d6..7b0a359 100644 --- a/Leaflet.PolylineMeasure.js +++ b/Leaflet.PolylineMeasure.js @@ -662,7 +662,7 @@ if (!this.options.useSubunits) { dist = (dist/1000).toFixed(3); } else { - dist = (dist).toFixed(0); + dist = (dist).toFixed(2); unit = this.options.unitControlLabel.metres; } }