Draw click event triggered by click instead of up

This commit is contained in:
Ansis Brammanis
2013-02-06 15:06:50 -05:00
parent 0d70e466de
commit 0acab34054

View File

@@ -27,7 +27,7 @@ iD.behavior.Draw = function(context) {
target.on('mousemove.draw', null);
d3.select(window).on('mouseup.draw', function() {
d3.select(window).on('click.draw', function() {
target.on('mousemove.draw', mousemove);
if (iD.geo.dist(pos, point()) < closeTolerance ||
(iD.geo.dist(pos, point()) < tolerance &&
@@ -35,7 +35,6 @@ iD.behavior.Draw = function(context) {
click();
}
});
}
function mousemove() {
@@ -111,7 +110,7 @@ iD.behavior.Draw = function(context) {
.on('mousedown.draw', null)
.on('mousemove.draw', null);
d3.select(window).on('mouseup.draw', null);
d3.select(window).on('click.draw', null);
d3.select(document)
.call(keybinding.off)