Skip to content

Commit

Permalink
Ctrl arrow decreases pan offset
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-lu-uw authored and prushforth committed Dec 5, 2021
1 parent 78e0c0e commit b857625
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/mapml/keyboard.js
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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(3);
}

map.panBy(offset);

Expand Down

0 comments on commit b857625

Please sign in to comment.