]> git.openstreetmap.org Git - rails.git/commitdiff
Show/hide "Where is this?" when setting search value from directions
authorAnton Khorev <tony29@yandex.ru>
Mon, 19 Aug 2024 17:05:48 +0000 (20:05 +0300)
committerAnton Khorev <tony29@yandex.ru>
Mon, 19 Aug 2024 17:05:48 +0000 (20:05 +0300)
app/assets/javascripts/index/directions.js

index 3f78c708945147f08df780715d320c66a56a8625..ff76f40086d3834f8c3d60b59b3206b497740d51 100644 (file)
@@ -75,6 +75,7 @@ OSM.Directions = function (map) {
 
   $(".directions_form .btn-close").on("click", function (e) {
     e.preventDefault();
 
   $(".directions_form .btn-close").on("click", function (e) {
     e.preventDefault();
+    $(".describe_location").toggle(!endpoints[0].value);
     $(".search_form input[name='query']").val(endpoints[0].value);
     OSM.router.route("/" + OSM.formatHash(map));
   });
     $(".search_form input[name='query']").val(endpoints[0].value);
     OSM.router.route("/" + OSM.formatHash(map));
   });