From: Tom Hughes Date: Mon, 31 Mar 2014 10:30:57 +0000 (+0100) Subject: Merge branch 'master' into overpass X-Git-Tag: live~4935^2~10 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/e7ef10d4289501a04045e01ecf7fe9202c09eb4f?hp=8dfad83a635a5c1cc48c234a8d8683cf978a8bd2 Merge branch 'master' into overpass --- diff --git a/app/assets/javascripts/index/history.js b/app/assets/javascripts/index/history.js index 8103f047e..cb1f6f8d5 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()