Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Reset updateContext timeout is too long #22

Closed
onion2k opened this issue Dec 14, 2018 · 1 comment · Fixed by #23
Closed

Reset updateContext timeout is too long #22

onion2k opened this issue Dec 14, 2018 · 1 comment · Fixed by #23
Labels
bug Something isn't working

Comments

@onion2k
Copy link

onion2k commented Dec 14, 2018

I've got a TransitionLink with exitLength, entryLength, and entryDelay all set to 5s. The transition works, but the call to reset the animation lengths to 0 and add the min-height to the div is taking a little too long - 15s rather than 10s.

I've had a look through the plugin code and I think I've narrowed the problem down to line #78 of triggerTransition. It's doing "exitDelay + entryDelay + entryLength + exitLength", but as the entryDelay timeout runs concurrently with the exit animation according to the timeline I think the calculation should be "exitDelay + entryLength + exitLength".

My TransitionLink code looks like this;

<TransitionLink
    exit={{
        trigger: ()=>{},
        delay: 0,
        length: 5
    }}
    entry={{
        delay: 5,
        length: 5,
        trigger: ()=>{}
    }}
    to={'/'}
>
@TylerBarnes
Copy link
Owner

Good catch! I think you're right. I'll get a fix in for this this weekend. Probably I'll check for which one is longer and use that one. Part of the reason for the calculation is to prevent people from clicking a link repeatedly during a longer transition.
Thanks for noticing!

@TylerBarnes TylerBarnes added the bug Something isn't working label Dec 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants