* @param {Carousel} carousel
(carousel)
| 401 | * @param {Carousel} carousel |
| 402 | */ |
| 403 | function currentClosestImageIndex(carousel) { |
| 404 | const currentTransformX = -currentTransform(carousel); |
| 405 | |
| 406 | const imageWidth = carousel.images[1].getBoundingClientRect().width; |
| 407 | return Math.round(currentTransformX / imageWidth); |
| 408 | } |
| 409 | |
| 410 | /** |
| 411 | * @param {Carousel} carousel |
no test coverage detected