From fc9bc73600ffaacb92692a12b655cbbac6ff3372 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sun, 2 Jun 2024 17:52:00 +0200 Subject: [PATCH] feat: routes - show name in tooltip --- modules/ui/general.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/ui/general.js b/modules/ui/general.js index 17f8886d..9c8c195f 100644 --- a/modules/ui/general.js +++ b/modules/ui/general.js @@ -151,7 +151,12 @@ function showMapTooltip(point, e, i, g) { return; } - if (group === "routes") return tip("Click to edit the Route"); + if (group === "routes") { + const routeId = +e.target.id.slice(5); + const name = pack.routes[routeId]?.name; + if (name) return tip(`${name}. Click to edit the Route`); + return tip("Click to edit the Route"); + } if (group === "terrain") return tip("Click to edit the Relief Icon");