When screen is resized (it happens often to me because I have a popup with a text field and android opening the keyboard resizes the full-screen-map) the center of the map is used as pivot, but if there is a popup on screen it would be nice to keep the popup visible (just like the popup does when it opens up in the first time).
I tried doing that with commit lapo-luchini/Leaflet@6940786 but that doesn't really work if the popup doesn't fit on screen (his own panBy generates a new moveend and it keeps bouncing left and right if wider than the screen). Proper fix would probably need firing viewreset after a resize, but I didn't find a nice way to do that (should be done on animation end, but that's managed elsewhere and it's not easy to modify).
When screen is resized (it happens often to me because I have a popup with a text field and android opening the keyboard resizes the full-screen-map) the center of the map is used as pivot, but if there is a popup on screen it would be nice to keep the popup visible (just like the popup does when it opens up in the first time).
I tried doing that with commit lapo-luchini/Leaflet@6940786 but that doesn't really work if the popup doesn't fit on screen (his own
panBygenerates a newmoveendand it keeps bouncing left and right if wider than the screen). Proper fix would probably need firingviewresetafter a resize, but I didn't find a nice way to do that (should be done on animation end, but that's managed elsewhere and it's not easy to modify).