close #84 set mousemoveData's source by event source

This commit is contained in:
Yanzhen Yu
2019-08-04 15:06:06 +08:00
parent 7f32fbdd05
commit 56c025fde3
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;