* Scrolls the container using animation frame
()
| 394 | * Scrolls the container using animation frame |
| 395 | */ |
| 396 | function scrollContainer() { |
| 397 | return animate(); |
| 398 | |
| 399 | function animate() { |
| 400 | const scroll = getScroll(); |
| 401 | if (!scroll) return; |
| 402 | prevScrollLeft = $parent.scrollLeft += scroll; |
| 403 | animationFrame = requestAnimationFrame(animate); |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | /** |
| 408 | * Gets the client position from the event |