PullDownToRefresh: adjust multiply rate for wheel
All checks were successful
/ depoly (push) Successful in 1m8s

This commit is contained in:
thislight 2024-08-12 11:05:20 +08:00
parent 7b67c79bc8
commit 1e6d4933b9
No known key found for this signature in database
GPG key ID: A50F9451AC56A63E

View file

@ -80,7 +80,7 @@ const PullDownToRefresh: Component<{
const handleLinkedWheel = (event: WheelEvent) => { const handleLinkedWheel = (event: WheelEvent) => {
const scrollTop = (event.target as HTMLElement).scrollTop; const scrollTop = (event.target as HTMLElement).scrollTop;
if (scrollTop >= 0 && scrollTop < 1) { if (scrollTop >= 0 && scrollTop < 1) {
ds = -(event.deltaY / window.devicePixelRatio); ds = -(event.deltaY / window.devicePixelRatio / 4);
if (released) { if (released) {
released = false; released = false;
requestAnimationFrame(updatePullDown); requestAnimationFrame(updatePullDown);