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

This commit is contained in:
Eoghan Murray
2026-04-01 12:00:00 +08:00
parent 78127d72ab
commit 11c973efb0
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;