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
This commit is contained in:
Jamie Guthrie 2018-02-13 01:28:57 +00:00 committed by Tom Hughes
parent c12ed85233
commit 97f75e82c0

View file

@ -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',