close #84 set mousemoveData's source by event source

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 78959df05d
commit 3a5e9271d5
4 changed files with 30 additions and 19 deletions

View File

@@ -59,6 +59,7 @@ export enum IncrementalSource {
Scroll,
ViewportResize,
Input,
TouchMove,
}
export type mutationData = {
@@ -66,7 +67,7 @@ export type mutationData = {
} & mutationCallbackParam;
export type mousemoveData = {
source: IncrementalSource.MouseMove;
source: IncrementalSource.MouseMove | IncrementalSource.TouchMove;
positions: mousePosition[];
};
@@ -176,7 +177,10 @@ type mutationCallbackParam = {
export type mutationCallBack = (m: mutationCallbackParam) => void;
export type mousemoveCallBack = (p: mousePosition[]) => void;
export type mousemoveCallBack = (
p: mousePosition[],
source: IncrementalSource.MouseMove | IncrementalSource.TouchMove,
) => void;
export type mousePosition = {
x: number;