From f8dbe5aff153061e20826b218c39f6e72e32ca3b Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Fri, 20 Jun 2025 00:50:37 +0200 Subject: Increase font size for measurement results. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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.) --- main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'main.js') 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); } }; })(); -- cgit v1.2.3