From 97f75e82c032ae897552e5c17adf7a1a73681488 Mon Sep 17 00:00:00 2001 From: Jamie Guthrie Date: Tue, 13 Feb 2018 01:28:57 +0000 Subject: [PATCH] Add padding to directions popups Clicking on a direction step now pans to the popup, but includes some padding so that the popup is not hidden in the corner of the screen. Closes #1745 --- app/assets/javascripts/index/directions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/index/directions.js b/app/assets/javascripts/index/directions.js index ce8ac9c1c..165d57f40 100644 --- a/app/assets/javascripts/index/directions.js +++ b/app/assets/javascripts/index/directions.js @@ -7,7 +7,7 @@ OSM.Directions = function (map) { var dragging; // true if the user is dragging a start/end point var chosenEngine; - var popup = L.popup(); + var popup = L.popup({autoPanPadding: [100, 100]}); var polyline = L.polyline([], { color: '#03f', -- 2.43.2