Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Commit

Permalink
fix(gestures): Fix gesture navigation for chrome (#191)
Browse files Browse the repository at this point in the history
* feat(deps): Update react, styled-components and use-gesture

update react and styled-components

update use-gesture

* fix(gestures): Fix vector access after dep upgrade and add touch-action: none to animated div

* Revert "feat(deps): Update react, styled-components and use-gesture"

This reverts commit 5263690.

* package lock

* roll back to stable version of react-use-gesture

* reset package-lock to state from main
  • Loading branch information
mismosmi committed Sep 17, 2021
1 parent ccf2b71 commit 87a825d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,11 @@ const Slider: React.FunctionComponent<SliderProps> = ({

// see: https://github.com/react-spring/react-spring/issues/861
// @ts-ignore
springPropsRef.update((index) => ({
offset: (active && down ? xDelta : 0) / width + (index - slide),
})).start();
springPropsRef
.update((index) => ({
offset: (active && down ? xDelta : 0) / width + (index - slide),
}))
.start();
}
},
onClick: () => {
Expand Down Expand Up @@ -270,6 +272,7 @@ const Slider: React.FunctionComponent<SliderProps> = ({
width: `${100 / slidesAtOnce}%`,
height: "100%",
willChange: "transform",
touchAction: "none",
}}
>
{childs[index]}
Expand Down

0 comments on commit 87a825d

Please sign in to comment.