mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-07 06:14:07 +00:00
progress
This commit is contained in:
@@ -99,12 +99,10 @@
|
||||
link,
|
||||
};
|
||||
if (target) {
|
||||
// the engine changes the selected waypoint
|
||||
await engine.selectWaypoints(target.fileId, [target.id]);
|
||||
await engine.updateWaypoint(waypoint);
|
||||
engine.updateWaypoint(target.fileId, target.id, waypoint);
|
||||
} else {
|
||||
// it goes in the selected files
|
||||
await engine.newWaypoint(waypoint);
|
||||
engine.newWaypoint(waypoint);
|
||||
}
|
||||
|
||||
reset();
|
||||
|
||||
@@ -449,10 +449,12 @@ class Engine {
|
||||
);
|
||||
}
|
||||
|
||||
/** Changes the selected waypoints. Empty strings remove the field. */
|
||||
updateWaypoint(waypoint: NewWaypoint) {
|
||||
/** Changes a waypoint, selected or not. Empty strings remove the field. */
|
||||
updateWaypoint(fileId: string, waypointId: string, waypoint: NewWaypoint) {
|
||||
return this.run((w) =>
|
||||
w.update_waypoint(
|
||||
fileId,
|
||||
waypointId,
|
||||
waypoint.lng,
|
||||
waypoint.lat,
|
||||
waypoint.ele,
|
||||
|
||||
Reference in New Issue
Block a user