(name: keyof Pixel)
| 247 | }; |
| 248 | |
| 249 | const handleAnimation = (name: keyof Pixel) => { |
| 250 | if (animationRef.current !== null) { |
| 251 | cancelAnimationFrame(animationRef.current); |
| 252 | } |
| 253 | animationRef.current = requestAnimationFrame(() => doAnimate(name)); |
| 254 | }; |
| 255 | |
| 256 | const onMouseEnter = () => handleAnimation('appear'); |
| 257 | const onMouseLeave = () => handleAnimation('disappear'); |
no test coverage detected