mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-28 12:36:41 +07:00
added ability to clear router/poly
This commit is contained in:
parent
f2c9cc4abc
commit
7fc53444a8
4 changed files with 23 additions and 3 deletions
|
@ -127,8 +127,12 @@ export class Router {
|
|||
const { coordinates } = route;
|
||||
this.pushPolyPoints(coordinates);
|
||||
const waypoints = this.router.getWaypoints().filter(({ latLng }) => !!latLng);
|
||||
this.router.setWaypoints(waypoints[waypoints.length-1]);
|
||||
this.router.setWaypoints(waypoints[waypoints.length - 1]);
|
||||
|
||||
// this.changeMode(MODES.POLY);
|
||||
};
|
||||
|
||||
clearAll = () => {
|
||||
this.router.setWaypoints([]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue