Skip to content

Tracked Position on Page load #26

Description

@mikegallay

A few of the items I am tracking appear slightly above the bottom of the page on load. These items are appearing with a translate3d y-position of -33% (see code below). Once I scroll they jump to the calculated position based on my tween. Is there any way to have the tween calculate and apply while their position on load (without seeing a jump)?

I have already tried applying a scroll using js, but you can still see they items jump once the calculated tween takes hold. Thanks!

<DIV
	className='tile-wrapper-scroll'
	style={ tween(scrollY, [
		[posTopBottom, { transform: translate3d(0, percent(0), 0) }],
		[posBottomTop, { transform: translate3d(0, percent(-33), 0) }]
	])}
	>
	<div className='tile-wrapper' style={tileStyle}></div>
</DIV>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions