fix(moveNewHandler): Avoid ghost annotations on fast mouse events
Showing 1 of 1 files from the diff.
@@ -32,6 +32,8 @@
Loading
32 | 32 | ? moveHandle |
|
33 | 33 | : moveNewHandle; |
|
34 | 34 | ||
35 | + | const timestamp = new Date().getTime(); |
|
36 | + | ||
35 | 37 | handleMover( |
|
36 | 38 | eventData, |
|
37 | 39 | tool.name, |
@@ -44,7 +46,18 @@
Loading
44 | 46 | return; |
|
45 | 47 | } |
|
46 | 48 | ||
47 | - | if (success) { |
|
49 | + | const hasThreshold = |
|
50 | + | tool.configuration && |
|
51 | + | Object(tool.configuration).hasOwnProperty( |
|
52 | + | 'measurementCreationThreshold' |
|
53 | + | ); |
|
54 | + | ||
55 | + | const isTooFast = hasThreshold |
|
56 | + | ? new Date().getTime() - timestamp < |
|
57 | + | tool.configuration.measurementCreationThreshold |
|
58 | + | : false; |
|
59 | + | ||
60 | + | if (success && isTooFast === false) { |
|
48 | 61 | const eventType = EVENTS.MEASUREMENT_COMPLETED; |
|
49 | 62 | const eventData = { |
|
50 | 63 | toolName: tool.name, |
Files | Coverage |
---|---|
src | 21.70% |
Project Totals (287 files) | 21.70% |
7081.0
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.