Skip to content

Commit

Permalink
fix(addNewMeasurement): Use new config property to optionally skip fa…
Browse files Browse the repository at this point in the history
…st events
  • Loading branch information
igoroctaviano committed Jul 26, 2022
1 parent 2dfa6ae commit 568c1b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/eventDispatchers/mouseEventHandlers/addNewMeasurement.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ export default function(evt, tool) {
return;
}

const isTooFast = new Date().getTime() - timestamp < 150;
const isTooFast =
tool.configuration && tool.configuration.ignoreFastEvents === true
? new Date().getTime() - timestamp < 150
: false;

if (success && isTooFast === false) {
const eventType = EVENTS.MEASUREMENT_COMPLETED;
Expand Down

0 comments on commit 568c1b2

Please sign in to comment.