From 3b29b6bc91c5b732f5937785dc3a0d315f364a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Sat, 18 Nov 2017 19:20:26 +0100 Subject: [PATCH] snapping needs to be with ctrl, otherwise drawing won't work --- src/c3nav/editor/static/editor/js/editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/c3nav/editor/static/editor/js/editor.js b/src/c3nav/editor/static/editor/js/editor.js index c09f1037..828ce450 100644 --- a/src/c3nav/editor/static/editor/js/editor.js +++ b/src/c3nav/editor/static/editor/js/editor.js @@ -327,7 +327,7 @@ editor = { editor._orig_vertex_pos = null; }); editor.map.on('editable:vertex:drag', function (e) { - if (e.originalEvent.shiftKey && editor._orig_vertex_pos) { + if (e.originalEvent.ctrlKey && editor._orig_vertex_pos) { var dx = e.latlng.lng - editor._orig_vertex_pos[1], dy = e.latlng.lat - editor._orig_vertex_pos[0], angle = Math.atan2(dy, dx) * (180 / Math.PI), @@ -339,7 +339,7 @@ editor = { e.vertex.setLatLng([Math.round(e.latlng.lat*100)/100, Math.round(e.latlng.lng*100)/100]); }); editor.map.on('editable:drawing:click editable:drawing:move', function (e) { - if (e.originalEvent.shiftKey && editor._last_vertex) { + if (e.originalEvent.ctrlKey && editor._last_vertex) { var dx = e.latlng.lng - editor._last_vertex.latlng.lng, dy = e.latlng.lat - editor._last_vertex.latlng.lat, angle = Math.atan2(dy, dx) * (180 / Math.PI),