From f65803d99f7d0a97e9ac7dbacceee470b3a4686f Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Tue, 5 Feb 2013 15:39:58 -0500 Subject: [PATCH] Make restriction both space and time --- js/id/behavior/draw.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/id/behavior/draw.js b/js/id/behavior/draw.js index 078e257b2..e482138ec 100644 --- a/js/id/behavior/draw.js +++ b/js/id/behavior/draw.js @@ -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(); } });