From 92730009e01f6d8fa8d43a9e24561559ebb7303d Mon Sep 17 00:00:00 2001 From: Norbert Renner Date: Wed, 27 May 2015 20:01:03 +0200 Subject: [PATCH] fix showing tailer at start or after deleting last waypoint --- js/plugin/Routing.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/plugin/Routing.js b/js/plugin/Routing.js index 7a2a423..8dc4761 100644 --- a/js/plugin/Routing.js +++ b/js/plugin/Routing.js @@ -67,12 +67,12 @@ BR.Routing = L.Routing.extend({ // hide trailer over controls and outside map function show() { - if (this._hidden) { + if (this._hidden && this._parent._waypoints._first) { this._show(); } } function hide() { - if (!this._hidden) { + if (!this._hidden && this._parent._waypoints._first) { this._hide(); } }