Make restriction both space and time

This commit is contained in:
Tom MacWright
2013-02-05 15:39:58 -05:00
parent 67632d638f
commit f65803d99f

View File

@@ -28,8 +28,8 @@ iD.behavior.Draw = function(context) {
d3.select(window).on('mouseup.draw', function() {
target.on('mousemove.draw', mousemove);
if (iD.geo.dist(pos, point()) < tolerance ||
(+new Date() - time) < 500) {
if (iD.geo.dist(pos, point()) < tolerance &&
(+new Date() - time) < 1000) {
click();
}
});