fix: duplication tests pointer state leaking between tests (#9414)
* fix: duplication tests pointer state leaking between tests * fix snapshots
This commit is contained in:
@@ -180,10 +180,17 @@ export class Pointer {
|
||||
public clientX = 0;
|
||||
public clientY = 0;
|
||||
|
||||
static activePointers: Pointer[] = [];
|
||||
static resetAll() {
|
||||
Pointer.activePointers.forEach((pointer) => pointer.reset());
|
||||
}
|
||||
|
||||
constructor(
|
||||
private readonly pointerType: "mouse" | "touch" | "pen",
|
||||
private readonly pointerId = 1,
|
||||
) {}
|
||||
) {
|
||||
Pointer.activePointers.push(this);
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.clientX = 0;
|
||||
|
||||
Reference in New Issue
Block a user