Skip to content

Change appearance of scroll speed without affecting when element is not in viewport #24

Closed
@calsal8

Description

@calsal8

@calsal8 ya I think you misunderstand how the library is designed to work, or I don't understand the problem. The offsets are used to give an element the varying appearance of scroll speed. Increase the offsets the more the dramatic the effect.

Not sure if the question is meant to relate to v2 since you're referencing the v1 API. If you're having trouble with implementation open a new ticket and I can help you out there, as I'd like this ticket to be used for discussing v2. Thanks!

@jscottsmith Sorry if I posted in the wrong place, I thought my question was related to a new feature that could be included in V2. But let's clarify the question here first. Maybe the library is not designed to work as I would hope. Either way I find it very useful.

When I change the offsets the appearance of scroll speed change, just as you wrote. I've used offsetYMin={-1000} to achieve the fast scroll speed that I want. But that also keeps affecting the style animation when the element is 1000% outside the viewport. In my case I want the fast scroll speed but, for performance reasons, I don't want it to change the style when it's far outside the viewport. I'm thinking that could be solved with a multiplier that multiplies the scroll speed with a given number. What are your thoughts?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions