bind Esc-key

This commit is contained in:
Krivchikov Dmitry 2016-01-15 14:55:41 +03:00
parent 5b2247aa88
commit 4c447f4c8f
1 changed files with 6 additions and 0 deletions

View File

@ -143,6 +143,12 @@ function init(lat, lng) {
}
});
$(document).keyup(function (e) {
if (e.keyCode === 27) { // escape key
closePopup();
}
});
return true;
}