From: Jamie Guthrie Date: Tue, 13 Feb 2018 01:28:57 +0000 (+0000) Subject: Add padding to directions popups X-Git-Tag: live~3156 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/97f75e82c032ae897552e5c17adf7a1a73681488?ds=sidebyside 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 --- 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',