Make properties x and y optional in mouseInteractionParam (#1375)
* Make properties x and y optional in mouseInteractionParam The event representing a mouse interaction of focus an element does not include the properties x and y. Thus, they must be defined as optional. * Fix typings
This commit is contained in:
@@ -1161,8 +1161,8 @@ export class Replayer {
|
|||||||
this.lastMouseDownEvent = null;
|
this.lastMouseDownEvent = null;
|
||||||
}
|
}
|
||||||
this.mousePos = {
|
this.mousePos = {
|
||||||
x: d.x,
|
x: d.x || 0,
|
||||||
y: d.y,
|
y: d.y || 0,
|
||||||
id: d.id,
|
id: d.id,
|
||||||
debugData: d,
|
debugData: d,
|
||||||
};
|
};
|
||||||
@@ -1171,7 +1171,7 @@ export class Replayer {
|
|||||||
// don't draw a trail as user has lifted finger and is placing at a new point
|
// don't draw a trail as user has lifted finger and is placing at a new point
|
||||||
this.tailPositions.length = 0;
|
this.tailPositions.length = 0;
|
||||||
}
|
}
|
||||||
this.moveAndHover(d.x, d.y, d.id, isSync, d);
|
this.moveAndHover(d.x || 0, d.y || 0, d.id, isSync, d);
|
||||||
if (d.type === MouseInteractions.Click) {
|
if (d.type === MouseInteractions.Click) {
|
||||||
/*
|
/*
|
||||||
* don't want target.click() here as could trigger an iframe navigation
|
* don't want target.click() here as could trigger an iframe navigation
|
||||||
|
|||||||
@@ -417,8 +417,8 @@ export type CanvasArg =
|
|||||||
type mouseInteractionParam = {
|
type mouseInteractionParam = {
|
||||||
type: MouseInteractions;
|
type: MouseInteractions;
|
||||||
id: number;
|
id: number;
|
||||||
x: number;
|
x?: number;
|
||||||
y: number;
|
y?: number;
|
||||||
pointerType?: PointerTypes;
|
pointerType?: PointerTypes;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user