LLS: fix jumpy maximised map (#8387)
* add maxzoom to map fit bounds Signed-off-by: Kerry Archibald <kerrya@element.io> * take snapshot of bounds at center on dialog open Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
@@ -64,7 +64,7 @@ const useMapWithStyle = ({ id, centerGeoUri, onError, interactive, bounds }) =>
|
||||
[bounds.west, bounds.south],
|
||||
[bounds.east, bounds.north],
|
||||
);
|
||||
map.fitBounds(lngLatBounds, { padding: 100 });
|
||||
map.fitBounds(lngLatBounds, { padding: 100, maxZoom: 15 });
|
||||
} catch (error) {
|
||||
logger.error('Invalid map bounds', error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user