mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-21 19:26:41 +02:00
Switch back to mouseup, and block following click
This commit is contained in:
@@ -27,13 +27,19 @@ iD.behavior.Draw = function(context) {
|
||||
|
||||
target.on('mousemove.draw', null);
|
||||
|
||||
d3.select(window).on('click.draw', function() {
|
||||
d3.select(window).on('mouseup.draw', function() {
|
||||
target.on('mousemove.draw', mousemove);
|
||||
if (iD.geo.dist(pos, point()) < closeTolerance ||
|
||||
(iD.geo.dist(pos, point()) < tolerance &&
|
||||
(+new Date() - time) < 500)) {
|
||||
click();
|
||||
}
|
||||
if (target.node() === d3.event.target) {
|
||||
d3.select(window).on('click.draw', function() {
|
||||
d3.select(window).on('click.draw', null);
|
||||
d3.event.stopPropagation();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -110,7 +116,7 @@ iD.behavior.Draw = function(context) {
|
||||
.on('mousedown.draw', null)
|
||||
.on('mousemove.draw', null);
|
||||
|
||||
d3.select(window).on('click.draw', null);
|
||||
d3.select(window).on('mouseup.draw', null);
|
||||
|
||||
d3.select(document)
|
||||
.call(keybinding.off)
|
||||
|
||||
Reference in New Issue
Block a user