From 384a6768478765d22c82e1b4cc5b82cdba114ad1 Mon Sep 17 00:00:00 2001 From: ben-lu-uw <69722289+ben-lu-uw@users.noreply.github.com> Date: Sat, 4 Dec 2021 20:48:27 -0500 Subject: [PATCH] Ctrl arrow decreases pan offset (#601) * Ctrl arrow decreases pan offset * Decrease pan increment with ctrl- modifier key Co-authored-by: Peter Rushforth --- src/mapml/keyboard.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mapml/keyboard.js b/src/mapml/keyboard.js index e6f8c5daf..9304e03b2 100644 --- a/src/mapml/keyboard.js +++ b/src/mapml/keyboard.js @@ -1,7 +1,7 @@ L.Map.Keyboard.include({ _onKeyDown: function (e) { - if (e.altKey || e.ctrlKey || e.metaKey) { return; } + if (e.altKey || e.metaKey) { return; } let zoomIn = { 187: 187, @@ -27,6 +27,9 @@ L.Map.Keyboard.include({ if (e.shiftKey) { offset = L.point(offset).multiplyBy(3); } + if (e.ctrlKey) { + offset = L.point(offset).divideBy(5); + } map.panBy(offset);