From 9b446aa8461ccd927df36d78286de2ae18036fa2 Mon Sep 17 00:00:00 2001 From: thislight Date: Mon, 18 Nov 2024 23:14:30 +0800 Subject: [PATCH] StackedRouter: use touch radius to check --- src/platform/StackedRouter.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/platform/StackedRouter.tsx b/src/platform/StackedRouter.tsx index 53cf7ff..445be66 100644 --- a/src/platform/StackedRouter.tsx +++ b/src/platform/StackedRouter.tsx @@ -306,7 +306,10 @@ const StackedRouter: Component = (oprops) => { } const [fig0] = event.touches; 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; } origX = x;