()
| 246 | let currentTime = 0; |
| 247 | |
| 248 | function animateScroll() { |
| 249 | currentTime += increment; |
| 250 | const val = easeOutCubic(currentTime, start, change, duration); |
| 251 | scrollTo(element, val); |
| 252 | if (currentTime < duration) { |
| 253 | window.requestAnimationFrame(animateScroll); |
| 254 | } else { |
| 255 | callback(element); |
| 256 | } |
| 257 | } |
| 258 | animateScroll(); |
| 259 | } |
| 260 |
no test coverage detected
searching dependent graphs…