swiper
Version:
Most modern mobile touch slider and framework with hardware accelerated transitions
13 lines (12 loc) • 365 B
JavaScript
export default function (e) {
const swiper = this;
if (process.env.TARGET === 'desktop') {
swiper.emit('tap click', e);
} else if (!swiper.allowClick) {
if (swiper.params.preventClicks) e.preventDefault();
if (swiper.params.preventClicksPropagation && swiper.animating) {
e.stopPropagation();
e.stopImmediatePropagation();
}
}
}