From 9f4a4983c5303a99e2aa06b3803580d84bd49e51 Mon Sep 17 00:00:00 2001 From: Norbert Renner Date: Thu, 1 Jul 2021 12:02:49 +0200 Subject: [PATCH] Support beelines on reverse --- js/plugin/Routing.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/plugin/Routing.js b/js/plugin/Routing.js index 19907ac..7481fe4 100644 --- a/js/plugin/Routing.js +++ b/js/plugin/Routing.js @@ -422,10 +422,12 @@ BR.Routing = L.Routing.extend({ }, reverse: function () { - var waypoints = this.getWaypoints(); + const waypoints = this.getWaypoints(); + const beelineFlags = this.getBeelineFlags(); waypoints.reverse(); + beelineFlags.reverse(); this.clear(); - this.setWaypoints(waypoints); + this.setWaypoints(waypoints, beelineFlags); }, deleteLastPoint: function () {