Map values toFixed(1) and round option

This commit is contained in:
Guntis Smaukstelis
2025-03-20 22:17:28 +02:00
parent 24a2ff5868
commit 1742931a20
3 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ export function drawOnMap(
ctx.textAlign = "center";
ctx.textBaseline = "middle";
ctx.fillStyle = "#000000";
const numericValue = roundValues ? Math.round(value) : value;
const numericValue = roundValues ? Math.round(value) : value.toFixed(1);
const stringValue = numericValue.toString().replace(".", ",");
ctx.fillText(stringValue, localX, localY);