Skip to content

Commit

Permalink
fix touch
Browse files Browse the repository at this point in the history
  • Loading branch information
sett committed Jan 11, 2024
1 parent fe9970d commit ffc80d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/landing/Componets/Intro/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default function Intro() {
const rectBtn = refBtn.current.getBoundingClientRect();
const rectWrap = refWrap.current.getBoundingClientRect();

refActions.current.current = e.clientX - rectWrap.left - rectBtn.width / 2;
refActions.current.current = (e.touches[0].clientX || e.clientX) - rectWrap.left - rectBtn.width / 2;
refActions.current.current = Math.max(
Math.min(refActions.current.current, rectWrap.width - rectBtn.width),
0,
Expand Down

0 comments on commit ffc80d2

Please sign in to comment.