= allMedia.length) { currentIndex = Math.max(0, allMedia.length - 1); }
$nextTick(() => { $refs.carousel.scrollTo({ left: $refs.carousel.clientWidth * currentIndex, behavior: 'auto' }); scrollToThumb(currentIndex); });
" @touchstart="handleTouchStart($event)" @touchend="handleTouchEnd($event)">