- var ll = step[0],
- direction = step[1],
- instruction = step[2],
- dist = step[3],
- lineseg = step[4];
-
- cumulative += dist;
-
- if (dist < 5) {
- dist = "";
- } else if (dist < 200) {
- dist = Math.round(dist / 10) * 10 + "m";
- } else if (dist < 1500) {
- dist = Math.round(dist / 100) * 100 + "m";
- } else if (dist < 5000) {
- dist = Math.round(dist / 100) / 10 + "km";
- } else {
- dist = Math.round(dist / 1000) + "km";
- }
-
- var row = $("<tr class='turn'/>");
- row.append("<td><div class='direction i" + direction + "'/></td> ");
- row.append("<td class='instruction'>" + instruction);
- row.append("<td class='distance'>" + dist);
-
- row.on('click', function () {
+ const [ll, direction, instruction, dist, lineseg] = step;
+
+ const row = $("<tr class='turn'/>");
+ row.append("<td class='border-0'><div class='direction i" + direction + "'/></td> ");
+ row.append("<td>" + instruction);
+ row.append("<td class='distance text-body-secondary text-end'>" + getDistText(dist));
+
+ row.on("click", function () {