This repository was archived by the owner on Feb 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +20
-18
lines changed Expand file tree Collapse file tree 2 files changed +20
-18
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vue-agile" ,
3
- "version" : " 0.3.4 " ,
3
+ "version" : " 0.3.5 " ,
4
4
"description" : " Carousel component for Vue.js" ,
5
5
"author" :
" Łukasz Florczak <[email protected] >" ,
6
6
"license" : " MIT" ,
Original file line number Diff line number Diff line change 287
287
},
288
288
289
289
handleMouseOver (element ) {
290
- if ((element === ' dot' && this .settings .pauseOnDotsHover ) || (element === ' track' && this .settings .pauseOnHover )) {
291
- this .disableAutoplayMode ()
290
+ if (this .settings .autoplay ) {
291
+ if ((element === ' dot' && this .settings .pauseOnDotsHover ) || (element === ' track' && this .settings .pauseOnHover )) {
292
+ this .disableAutoplayMode ()
293
+ }
292
294
}
293
295
},
294
296
295
297
handleMouseOut (element ) {
296
- if ((element === ' dot' && this .settings .pauseOnDotsHover ) || (element === ' track' && this .settings .pauseOnHover )) {
297
- this .enableAutoplayMode ()
298
+ if (this .settings .autoplay ) {
299
+ if ((element === ' dot' && this .settings .pauseOnDotsHover ) || (element === ' track' && this .settings .pauseOnHover )) {
300
+ this .enableAutoplayMode ()
301
+ }
298
302
}
299
303
},
300
304
574
578
},
575
579
576
580
dragDistance () {
577
- if (! this .mouseDown ) {
578
- return false
579
- }
581
+ if (this .mouseDown ) {
582
+ if (this .dragDistance > this .swipeDistance ) {
583
+ if (! this .settings .infinite && this .currentSlide === 0 ) {
584
+ return
585
+ }
580
586
581
- if (this .dragDistance > this .swipeDistance ) {
582
- if (! this .settings .infinite && this .currentSlide === 0 ) {
583
- return
587
+ this .prevSlide ()
584
588
}
585
589
586
- this .goToPrev ()
587
- this .handleMouseUp ()
588
- }
590
+ if (this .dragDistance < - 1 * this .swipeDistance ) {
591
+ if (! this .settings .infinite && this .currentSlide === this .slidesCount - 1 ) {
592
+ return
593
+ }
589
594
590
- if (this .dragDistance < - 1 * this .swipeDistance ) {
591
- if (! this .settings .infinite && this .currentSlide === this .slidesCount - 1 ) {
592
- return
595
+ this .nextSlide ()
593
596
}
594
597
595
- this .goToNext ()
596
598
this .handleMouseUp ()
597
599
}
598
600
}
You can’t perform that action at this time.
0 commit comments