From b0557a5d589973705c6aa9cb03822286f7886720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Sun, 18 Jun 2017 01:12:38 +0200 Subject: [PATCH] dont zoom out when starting to edit something --- src/c3nav/editor/static/editor/js/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c3nav/editor/static/editor/js/editor.js b/src/c3nav/editor/static/editor/js/editor.js index aab2c1d4..453bfd1b 100644 --- a/src/c3nav/editor/static/editor/js/editor.js +++ b/src/c3nav/editor/static/editor/js/editor.js @@ -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] });