From fb0f823d50e3c12f75ee429e76ebccf795de14a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Thu, 27 Jul 2017 16:26:38 +0200 Subject: [PATCH] change weight of line geometries on zoom for smoother zooming --- src/c3nav/editor/static/editor/js/editor.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/c3nav/editor/static/editor/js/editor.js b/src/c3nav/editor/static/editor/js/editor.js index 47b169f6..23fb488d 100644 --- a/src/c3nav/editor/static/editor/js/editor.js +++ b/src/c3nav/editor/static/editor/js/editor.js @@ -281,6 +281,7 @@ editor = { geometrystyles: {}, _loading_geometry: false, _geometries_layer: null, + _line_geometries: [], _highlight_layer: null, _highlight_type: null, _editing_id: null, @@ -320,6 +321,13 @@ editor = { e.vertex.continue(); }); + editor.map.on('zoomend', function(e) { + var weight = editor._weight_for_zoom(); + for(var i=0;i