We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b818f08 commit 646a88cCopy full SHA for 646a88c
packages/parallax/src/index.tsx
@@ -70,8 +70,7 @@ export const ParallaxLayer = React.memo(
70
const layer = useMemoOne<IParallaxLayer>(
71
() => ({
72
setPosition(height, scrollTop, immediate = false) {
73
- const targetScroll = Math.floor(offset) * height
74
- const distance = height * offset + targetScroll * speed
+ const distance = height * offset
75
ctrl.start({
76
translate: -(scrollTop * speed) + distance,
77
config: parent.config,
0 commit comments