X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a796c41881c26e6da8828a71dbfb533613e5a83f..35fbcf28154b6f15f697018016fbabc952e018a5:/app/assets/javascripts/index/history.js?ds=inline diff --git a/app/assets/javascripts/index/history.js b/app/assets/javascripts/index/history.js index 8103f047e..d54928eb8 100644 --- a/app/assets/javascripts/index/history.js +++ b/app/assets/javascripts/index/history.js @@ -11,10 +11,15 @@ OSM.History = function(map) { .on("mouseout", "[data-changeset]", function () { unHighlightChangeset($(this).data("changeset").id); }) - .on("click", "[data-changeset]", function (e) { - if (!$(e.target).is('a')) { - clickChangeset($(this).data("changeset").id, e); - } + .on("mousedown", "[data-changeset]", function () { + var moved = false; + $(this).one("click", function (e) { + if (!moved && !$(e.target).is('a')) { + clickChangeset($(this).data("changeset").id, e); + } + }).one("mousemove", function () { + moved = true; + }); }); var group = L.featureGroup() @@ -57,7 +62,7 @@ OSM.History = function(map) { url: window.location.pathname, method: "GET", data: data, - success: function(html, status, xhr) { + success: function(html) { $('#sidebar_content .changesets').html(html); updateMap(); }