[gnome-maps] routingDelegator: Add function to reset
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] routingDelegator: Add function to reset
- Date: Tue, 20 Jun 2017 20:17:15 +0000 (UTC)
commit 9f9c94b379f1b64482253905a84bd9e4f9659e41
Author: Marcus Lundblad <ml update uu se>
Date: Tue Jun 20 21:58:33 2017 +0200
routingDelegator: Add function to reset
This function will reset the turn-by-turn route object or
the transit plan for transit mode. This will be used by
the map bubble to reset when requesting a route to the current
object.
https://bugzilla.gnome.org/show_bug.cgi?id=784013
src/routingDelegator.js | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/routingDelegator.js b/src/routingDelegator.js
index d3896de..7029e46 100644
--- a/src/routingDelegator.js
+++ b/src/routingDelegator.js
@@ -64,6 +64,13 @@
this._transitRouting = useTransit;
},
+ reset: function() {
+ if (this._transitRouting)
+ this._openTripPlanner.plan.reset();
+ else
+ this._graphHopper.route.reset();
+ },
+
_onQueryChanged: function() {
if (this._query.isValid()) {
if (this._transitRouting) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]