dont zoom out when starting to edit something

This commit is contained in:
Laura Klünder 2017-06-18 01:12:38 +02:00
parent a60d2ba36c
commit b0557a5d58

View file

@ -298,7 +298,7 @@ editor = {
if (editor._bounds_layer === null) editor._bounds_layer = editor._geometries_layer;
if (editor._next_zoom) {
editor.map.flyToBounds((editor._bounds_layer.getBounds !== undefined) ? editor._bounds_layer.getBounds() : [editor._bounds_layer.getLatLng(), editor._bounds_layer.getLatLng()], {
maxZoom: 4,
maxZoom: Math.max(4, editor.map.getZoom()),
duration: 0.5,
padding: [20, 20]
});