This repository was archived by the owner on Feb 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +21
-21
lines changed Expand file tree Collapse file tree 1 file changed +21
-21
lines changed Original file line number Diff line number Diff line change 279
279
},
280
280
281
281
handleMouseOver (element ) {
282
- if ((element === ' dot' && this .settings .pauseOnDotsHover ) || (element === ' track' && this .settings .pauseOnHover )) {
283
- this .disableAutoplayMode ()
282
+ if (this .settings .autoplay ) {
283
+ if ((element === ' dot' && this .settings .pauseOnDotsHover ) || (element === ' track' && this .settings .pauseOnHover )) {
284
+ this .disableAutoplayMode ()
285
+ }
284
286
}
285
287
},
286
288
287
289
handleMouseOut (element ) {
288
- if ((element === ' dot' && this .settings .pauseOnDotsHover ) || (element === ' track' && this .settings .pauseOnHover )) {
289
- this .enableAutoplayMode ()
290
+ if (this .settings .autoplay ) {
291
+ if ((element === ' dot' && this .settings .pauseOnDotsHover ) || (element === ' track' && this .settings .pauseOnHover )) {
292
+ this .enableAutoplayMode ()
293
+ }
290
294
}
291
295
},
292
296
529
533
530
534
watch: {
531
535
show () {
532
- console .log (this .show )
533
-
534
536
this .getWidth ()
535
537
this .reload ()
536
538
},
540
542
},
541
543
542
544
dragDistance () {
543
- if (! this .mouseDown ) {
544
- return false
545
- }
545
+ if (this .mouseDown ) {
546
+ if (this .dragDistance > this .swipeDistance ) {
547
+ if (! this .settings .infinite && this .currentSlide === 0 ) {
548
+ return
549
+ }
546
550
547
- if (this .dragDistance > this .swipeDistance ) {
548
- if (! this .settings .infinite && this .currentSlide === 0 ) {
549
- return
551
+ this .prevSlide ()
552
+ this .handleMouseUp ()
550
553
}
551
554
552
- this .prevSlide ()
553
- this .handleMouseUp ()
554
- }
555
+ if (this .dragDistance < - 1 * this .swipeDistance ) {
556
+ if (! this .settings .infinite && this .currentSlide === this .slidesCount - 1 ) {
557
+ return
558
+ }
555
559
556
- if (this .dragDistance < - 1 * this .swipeDistance ) {
557
- if (! this .settings .infinite && this .currentSlide === this .slidesCount - 1 ) {
558
- return
560
+ this .nextSlide ()
561
+ this .handleMouseUp ()
559
562
}
560
-
561
- this .nextSlide ()
562
- this .handleMouseUp ()
563
563
}
564
564
}
565
565
}
You can’t perform that action at this time.
0 commit comments