setGrabCursor.js 491 B

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