]> git.openstreetmap.org Git - rails.git/commitdiff
jsrouting: don't close the smallscreen header until both geocodes entered
authorDan Stowell <danstowell@users.sourceforge.net>
Sun, 8 Feb 2015 11:11:53 +0000 (11:11 +0000)
committerDan Stowell <danstowell@users.sourceforge.net>
Sun, 8 Feb 2015 11:11:53 +0000 (11:11 +0000)
app/assets/javascripts/index/directions.js.erb

index 72299ea1dd79e8f02d2efb7d8b188f75ebd0f78a..7b1ef3c5b8af4f4e3630bd4f2fed715b73091555 100644 (file)
@@ -163,6 +163,7 @@ OSM.Directions = function (map) {
         d = endpoints[1].latlng;
 
     if (!o || !d) return;
+    $("header").addClass("closed");
 
     var precision = OSM.zoomPrecision(map.getZoom());
 
@@ -295,7 +296,6 @@ OSM.Directions = function (map) {
 
   $(".directions_form").on("submit", function(e) {
     e.preventDefault();
-    $("header").addClass("closed");
     getRoute();
   });