Fixed #264 - Carousel - Button inside carousel-item is not clickable in mobile phones

pull/310/head
yigitfindikli 2020-04-07 13:38:17 +03:00
parent 2aa2f1fd26
commit 56fae39ec6
1 changed files with 9 additions and 6 deletions

View File

@ -106,7 +106,8 @@ export default {
d_page: this.page, d_page: this.page,
totalShiftedItems: this.page * this.numScroll * -1, totalShiftedItems: this.page * this.numScroll * -1,
allowAutoplay : !!this.autoplayInterval, allowAutoplay : !!this.autoplayInterval,
d_circular : this.circular || this.allowAutoplay d_circular : this.circular || this.allowAutoplay,
swipeThreshold: 20
} }
}, },
isRemainingItemsAdded: false, isRemainingItemsAdded: false,
@ -281,12 +282,14 @@ export default {
} }
}, },
changePageOnTouch(e, diff) { changePageOnTouch(e, diff) {
if (Math.abs(diff) > this.swipeThreshold) {
if (diff < 0) { // left if (diff < 0) { // left
this.navForward(e); this.navForward(e);
} }
else { // right else { // right
this.navBackward(e); this.navBackward(e);
} }
}
}, },
bindDocumentListeners() { bindDocumentListeners() {
if (!this.documentResizeListener) { if (!this.documentResizeListener) {