Skip to content

Commit 568c1b2

Browse files
committed
fix(addNewMeasurement): Use new config property to optionally skip fast events
1 parent 2dfa6ae commit 568c1b2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/eventDispatchers/mouseEventHandlers/addNewMeasurement.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ export default function(evt, tool) {
4646
return;
4747
}
4848

49-
const isTooFast = new Date().getTime() - timestamp < 150;
49+
const isTooFast =
50+
tool.configuration && tool.configuration.ignoreFastEvents === true
51+
? new Date().getTime() - timestamp < 150
52+
: false;
5053

5154
if (success && isTooFast === false) {
5255
const eventType = EVENTS.MEASUREMENT_COMPLETED;

0 commit comments

Comments
 (0)