setGrabCursor.js 511 B

123456789
  1. export default function setGrabCursor(moving) {
  2. const swiper = this;
  3. if (swiper.support.touch || !swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;
  4. const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl;
  5. el.style.cursor = 'move';
  6. el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
  7. el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
  8. el.style.cursor = moving ? 'grabbing' : 'grab';
  9. }