add new anchors by clicking on the temporary one

This commit is contained in:
vcoppe
2024-09-04 14:42:26 +02:00
parent 2612eb2e91
commit 5be02d1c36
3 changed files with 105 additions and 4 deletions

View File

@@ -78,9 +78,11 @@ export function getClosestLinePoint(points: TrackPoint[], point: TrackPoint | Co
if (distance(points[i], point) <= distance(points[i + 1], point)) {
closest = points[i];
details['before'] = true;
details['index'] = i;
} else {
closest = points[i + 1];
details['before'] = false;
details['index'] = i + 1;
}
}
}