aboutsummaryrefslogtreecommitdiffstats
path: root/main.js
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2025-06-20 00:50:37 +0200
committerGuilhem Moulin <guilhem@fripost.org>2025-06-20 01:18:11 +0200
commitf8dbe5aff153061e20826b218c39f6e72e32ca3b (patch)
treeb492e986cbc941145db96c158eb702293b517208 /main.js
parenta1b869ea016d9116ec9f7f132541d4a1018ccf5e (diff)
Increase font size for measurement results.
And ensure it overflows on the left. (It's right-aligned and there is room for 10⁶ km² with one decimal which is way more than likely needed, but we don't want any overflow to push the unit to the right side of the box.)
Diffstat (limited to 'main.js')
-rw-r--r--main.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.js b/main.js
index 8169ff5..cbde618 100644
--- a/main.js
+++ b/main.js
@@ -3792,7 +3792,9 @@ const infoMetadataAccordions = [];
value.nodeValue = formatters[1].format(v/10_000);
} else {
unit.nodeValue = 'km²';
- value.nodeValue = formatters[1].format(v/1_000_000);
+ v /= 1_000_000;
+ const i = v < 1_000_000 ? 1 : 0; /* ≥10⁶ km² overflows the box with 2 decimals */
+ value.nodeValue = formatters[i].format(v);
}
};
})();