Close small mode menu on some interactions

This commit is contained in:
Anton Khorev 2024-05-29 07:14:44 +03:00
parent e717c375bc
commit 7fb432dc32
2 changed files with 4 additions and 0 deletions

View file

@ -412,6 +412,9 @@ $(document).ready(function () {
if (OSM.router.route(this.pathname + this.search + this.hash)) {
e.preventDefault();
if (this.pathname !== "/directions") {
$("header").addClass("closed");
}
}
});

View file

@ -32,6 +32,7 @@ OSM.Search = function (map) {
$(".describe_location").on("click", function (e) {
e.preventDefault();
$("header").addClass("closed");
var center = map.getCenter().wrap(),
precision = OSM.zoomPrecision(map.getZoom()),
lat = center.lat.toFixed(precision),