Skip to content

Commit 646a88c

Browse files
committed
fix(parallax): remove extra targetScroll space
this was causing some elements to have an extra viewport height gap. see issue for more details. fixes #692
1 parent b818f08 commit 646a88c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/parallax/src/index.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ export const ParallaxLayer = React.memo(
7070
const layer = useMemoOne<IParallaxLayer>(
7171
() => ({
7272
setPosition(height, scrollTop, immediate = false) {
73-
const targetScroll = Math.floor(offset) * height
74-
const distance = height * offset + targetScroll * speed
73+
const distance = height * offset
7574
ctrl.start({
7675
translate: -(scrollTop * speed) + distance,
7776
config: parent.config,

0 commit comments

Comments
 (0)