Ignore clicks on history entries if the mouse has moved
Ignore click events on history events if the mouse moves so that drag selection can work. Fixes #581.
This commit is contained in:
parent
5c58f00c2e
commit
883a375d1a
1 changed files with 9 additions and 4 deletions
|
@ -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')) {
|
||||
.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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue