'l' toggles locate state (#462)

This commit is contained in:
Marcus Jaschen 2021-11-22 21:29:28 +01:00 committed by GitHub
parent e822a97ed0
commit 103b00a519
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,6 +120,10 @@ BR.Map = {
'keydown', 'keydown',
function (e) { function (e) {
if (BR.Util.keyboardShortcutsAllowed(e) && e.keyCode === this.options.shortcut.locate) { if (BR.Util.keyboardShortcutsAllowed(e) && e.keyCode === this.options.shortcut.locate) {
if (locationControl._active) {
locationControl.stop();
return;
}
locationControl.start(); locationControl.start();
} }
}, },