StackedRouter: use touch radius to check
All checks were successful
/ depoly (push) Successful in 1m18s

This commit is contained in:
thislight 2024-11-18 23:14:30 +08:00
parent 840ad2cf00
commit 9b446aa846
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E

View file

@ -306,7 +306,10 @@ const StackedRouter: Component<StackedRouterProps> = (oprops) => {
} }
const [fig0] = event.touches; const [fig0] = event.touches;
const { x, width } = event.currentTarget.getBoundingClientRect(); const { x, width } = event.currentTarget.getBoundingClientRect();
if (fig0.clientX < (x - 44) || fig0.clientX > (x + 44)) { if (
fig0.clientX - fig0.radiusX < x - 22 ||
fig0.clientX + fig0.radiusX > x + 22
) {
return; return;
} }
origX = x; origX = x;