X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/d40d32889c85577347733fcf9040002600e1962b..08837b2f8b3a8434875682f8f18962a9bce73c46:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 7369c0fb4..f3df5ae67 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -356,6 +356,8 @@ $(document).ready(function () { $(".search").hide(); $(".routing").show(); $(".query_wrapper.routing [name=route_from]").focus(); + $("#map").on('dragend dragover',function(e) { e.preventDefault(); }); + $("#map").on('drop',function(e) { OSM.routing.handleDrop(e); }); }); $(".close_directions").on("click",function(e) { @@ -363,6 +365,7 @@ $(document).ready(function () { $(".search").show(); $(".routing").hide(); OSM.routing.close(); + $("#map").off('dragend drop dragover'); $(".query_wrapper.search [name=query]").focus(); });