%PDF- %PDF-
Direktori : /var/www/html/node_modules/swiper/shared/ |
Current File : /var/www/html/node_modules/swiper/shared/effect-virtual-transition-end.js |
export default function effectVirtualTransitionEnd(_ref) { let { swiper, duration, transformEl, allSlides } = _ref; const { slides, activeIndex, $wrapperEl } = swiper; if (swiper.params.virtualTranslate && duration !== 0) { let eventTriggered = false; let $transitionEndTarget; if (allSlides) { $transitionEndTarget = transformEl ? slides.find(transformEl) : slides; } else { $transitionEndTarget = transformEl ? slides.eq(activeIndex).find(transformEl) : slides.eq(activeIndex); } $transitionEndTarget.transitionEnd(() => { if (eventTriggered) return; if (!swiper || swiper.destroyed) return; eventTriggered = true; swiper.animating = false; const triggerEvents = ['webkitTransitionEnd', 'transitionend']; for (let i = 0; i < triggerEvents.length; i += 1) { $wrapperEl.trigger(triggerEvents[i]); } }); } }