From 3dc66dc9b872ecffcc9a64b1c9e67470a8b897a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Sun, 11 Jun 2017 12:34:11 +0200 Subject: [PATCH] fix creation of new geometries in editor --- src/c3nav/editor/static/editor/js/editor.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/c3nav/editor/static/editor/js/editor.js b/src/c3nav/editor/static/editor/js/editor.js index 050e3f4a..9d0338f4 100644 --- a/src/c3nav/editor/static/editor/js/editor.js +++ b/src/c3nav/editor/static/editor/js/editor.js @@ -236,12 +236,11 @@ editor = { editor.map.doubleClickZoom.disable(); }); editor.map.on('editable:vertex:drag', function (e) { - e.vertex.setLatLng([(Math.round(e.latlng.lat*100)/100).toFixed(2), - (Math.round(e.latlng.lng*100)/100).toFixed(2)]); + e.vertex.setLatLng([Math.round(e.latlng.lat*100)/100, Math.round(e.latlng.lng*100)/100]); }); editor.map.on('editable:drawing:click', function (e) { - e.latlng.lat = (Math.round(e.latlng.lat*100)/100).toFixed(2); - e.latlng.lng = (Math.round(e.latlng.lng*100)/100).toFixed(2); + e.latlng.lat = Math.round(e.latlng.lat*100)/100; + e.latlng.lng = Math.round(e.latlng.lng*100)/100; }); editor.map.on('editable:vertex:ctrlclick editable:vertex:metakeyclick', function (e) { e.vertex.continue();