-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change transition duration independently #3826
Change transition duration independently #3826
Conversation
Lowered so it's more understandable what we are trying to accomplish with this separate value
Good point! 👍👍 The issue is basically here in the //even when the scrollingSpeed is 0 there's a little delay, which might cause the
//scrollingSpeed to change in case of using silentMoveTo();
if(options.scrollingSpeed){
clearTimeout(afterSectionLoadsId);
afterSectionLoadsId = setTimeout(function () {
afterSectionLoads(v);
}, options.scrollingSpeed); /// <--------------- here
}else{
afterSectionLoads(v);
} So perhaps it will be easier to just change that value with the new option: afterSectionLoadsId = setTimeout(function () {
afterSectionLoads(v);
}, options.transitionLapse); /// <--------------- here A few advantages of this approach:
We would then have to think if we can apply that to the non CSS3 animation, we probably would have to modify the
Yeap, I agree! |
I think your idea is better. |
Let's reopen it to remind me of it :) |
Okay :D |
Is this still relevant? Maybe this would be better as an issue instead of a PR? |
This was fixed in July 2020. |
On my MacBook I tried to lower the scrollingSpeed, because i wanted the css transition from one section to the next to be faster (at around 250ms). The problem with this was, that with my MacBook (Chrome) the smooth scrolling takes longer than 250ms to come to rest. So then it scrolled over more than one section in one go and it's very difficult to scroll only to the next section.
So I tried to set a shorter transition time via css. But this doesn't work as you can't use silentMoveTo anymore, because the transition time is overriden.
So I came to the conclusion, that the scroll response wait time should be disconnected from the transition time.
P.S. slightly offtopic: I think that
all is bad for performance, it should be only transform. But I don't know if that would break other extensions.