Make the pointerType into an Enum to be consistent with other values in events

This commit is contained in:
Eoghan Murray
2023-04-05 15:06:46 +01:00
parent 2114dc47d4
commit 3a6de4b129
2 changed files with 21 additions and 8 deletions

View File

@@ -362,6 +362,12 @@ export enum MouseInteractions {
TouchCancel,
}
export enum PointerTypes {
Mouse,
Pen,
Touch,
}
export enum CanvasContext {
'2D',
WebGL,
@@ -404,7 +410,7 @@ type mouseInteractionParam = {
id: number;
x: number;
y: number;
pointerType?: string;
pointerType?: PointerTypes;
};
export type mouseInteractionCallBack = (d: mouseInteractionParam) => void;