Refactor getMiddlePoint function to getCloseToEdgePoint

This commit is contained in:
Azgaar 2024-08-02 11:34:54 +02:00
parent ff27937cc4
commit e6741b3a3b
4 changed files with 40 additions and 21 deletions

View file

@ -264,8 +264,8 @@ function editRoute(id) {
if (candidateRoutes.length) {
const options = candidateRoutes.map(r => {
r.name = r.name || Routes.generateName(r);
r.length = r.length || getRouteLength(r.i);
const length = rn(r.length * distanceScale) + " " + unit;
r.length = r.length || Routes.getLength(r.i);
const length = rn(r.length * distanceScale) + " " + distanceUnitInput.value;
return `<option value="${r.i}">${r.name} (${length})</option>`;
});
alertMessage.innerHTML = /* html */ `<div>Route to join with: