From 549c5ff58b4ab699aef926c41df37f40b4bca289 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sat, 13 Jul 2024 14:53:42 +0200 Subject: [PATCH] fix: tiles - add more letters to label --- index.html | 2 +- modules/ui/options.js | 9 +++++++-- versioning.js | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 9f87ebaf..c997c028 100644 --- a/index.html +++ b/index.html @@ -8110,7 +8110,7 @@ - + diff --git a/modules/ui/options.js b/modules/ui/options.js index 8b9e12a7..331a7476 100644 --- a/modules/ui/options.js +++ b/modules/ui/options.js @@ -921,11 +921,16 @@ function updateTilesOptions() { const tileH = (graphHeight / tilesY) | 0; const alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + function getRowLabel(row) { + const first = row >= alphabet.length ? alphabet[Math.floor(row / alphabet.length) - 1] : ""; + const last = alphabet[row % alphabet.length]; + return first + last; + } + for (let y = 0, row = 0; y + tileH <= graphHeight; y += tileH, row++) { for (let x = 0, column = 1; x + tileW <= graphWidth; x += tileW, column++) { rects.push(``); - const label = alphabet[row % alphabet.length] + column; - labels.push(`${label}`); + labels.push(`${getRowLabel(row)}${column}`); } } diff --git a/versioning.js b/versioning.js index 91176f92..0e5b2030 100644 --- a/versioning.js +++ b/versioning.js @@ -1,7 +1,7 @@ "use strict"; // version and caching control -const version = "1.98.01"; // generator version, update each time +const version = "1.98.02"; // generator version, update each time { document.title += " v" + version;