fix#71 fix touch event listener and throttle touch move callback

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 891b678557
commit 94ca07d45d
4 changed files with 29 additions and 9 deletions

View File

@@ -151,3 +151,9 @@ export function isAncestorRemoved(target: INode): boolean {
}
return isAncestorRemoved((target.parentNode as unknown) as INode);
}
export function isTouchEvent(
event: MouseEvent | TouchEvent,
): event is TouchEvent {
return Boolean((event as TouchEvent).changedTouches);
}