]> git.openstreetmap.org Git - rails.git/commitdiff
Add instruction index to popup
authorMarwin Hochfelsner <50826859+hlfan@users.noreply.github.com>
Sun, 6 Apr 2025 17:43:17 +0000 (19:43 +0200)
committerMarwin Hochfelsner <50826859+hlfan@users.noreply.github.com>
Sun, 6 Apr 2025 17:44:15 +0000 (19:44 +0200)
app/assets/javascripts/index/directions.js

index 8b3047b68e5d4802b0ce586a6eb326e5db958fa8..34b93016874c661c37e52ef4061fe0a986c4dad8 100644 (file)
@@ -199,7 +199,7 @@ OSM.Directions = function (map) {
         row.on("click", function () {
           popup
             .setLatLng(ll)
-            .setContent("<p>" + instruction + "</p>")
+            .setContent(`<p><b>${i + 1}.</b> ${instruction}</p>`)
             .openOn(map);
         });