react-leaflet icon indicating copy to clipboard operation
react-leaflet copied to clipboard

Leaflet Popup Autopan doesn't always move whole popup into view when clicking marker

Open andersodt opened this issue 9 years ago • 4 comments

Expected behavior

When clicking on a marker near the edge of the map view, the map should pan to show the entire contents of the popup.

Actual behavior

When clicking on a marker near the edge of the map view, the map pans slightly, only showing the very bottom of the popup.

Steps to reproduce

Go to the default WebpackBin. Move the map so the marker is near the top of the screen. Click the marker.

Compare this result with: Go to LeafletJS.com Move the map so the marker is near the top of the screen. Click the marker.

When going on LeafletJS.com, the marker's popup moves into view. When doing this using react-leaftlet, the popup does not move into view.

Here are some images of this in practice:

React-leaflet:

screen shot 2017-06-20 at 12 38 15 pm screen shot 2017-06-20 at 12 38 36 pm

LeafleatJS.com:

screen shot 2017-06-20 at 12 38 26 pm screen shot 2017-06-20 at 12 38 42 pm

andersodt avatar Jun 20 '17 17:06 andersodt

Thanks for the detailed report, should be fixed in v1.3.1.

PaulLeCam avatar Jun 20 '17 22:06 PaulLeCam

Great! Looks like it's working well for me. Thank you for fixing this so quickly, and thank you for your work on this project.

andersodt avatar Jun 20 '17 22:06 andersodt

Thanks!

PaulLeCam avatar Jun 21 '17 07:06 PaulLeCam

This isn't working again for some reason!

mhyassin avatar Aug 02 '18 19:08 mhyassin