()
| 77 | const outAnimation = useRef<ReturnType<typeof animate> | null>(null); |
| 78 | |
| 79 | const animateIn = async () => { |
| 80 | if ( |
| 81 | !inAnimation.current && |
| 82 | !outAnimation.current && |
| 83 | !hasAnimatedIn.current |
| 84 | ) { |
| 85 | const animation = animate(inSequence); |
| 86 | inAnimation.current = animation; |
| 87 | await animation; |
| 88 | inAnimation.current = null; |
| 89 | if (animation.speed === 1) hasAnimatedIn.current = true; |
| 90 | } else if (outAnimation.current) { |
| 91 | outAnimation.current.speed = -1; |
| 92 | } else if (inAnimation.current) { |
| 93 | inAnimation.current.speed = 1; |
| 94 | } |
| 95 | }; |
| 96 | |
| 97 | const animateOut = async () => { |
| 98 | if (inAnimation.current) { |
no test coverage detected
searching dependent graphs…