Commit 6be7293a authored by patrickhlauke's avatar patrickhlauke Committed by XhmikosR
Browse files

Abandon swipe altogether if more than one touch detected

parent 7b8f01d8
2 merge requests!28721Hot test,!27561Adds font-weight-medium to font weight classes
Showing with 4 additions and 3 deletions
+4 -3
......@@ -283,8 +283,8 @@ class Carousel {
if (this._pointerEvent && (originEvent.pointerType === PointerType.TOUCH || originEvent.pointerType === PointerType.PEN)) {
this.touchStartX = originEvent.clientX
} else {
this.touchStartX = originEvent.touches[0].pageX
} else if (!this._pointerEvent) {
this.touchStartX = originEvent.touches[0].clientX
}
}
......@@ -293,11 +293,12 @@ class Carousel {
// ensure swiping with one touch and not pinching
if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
this.touchDeltaX = 0;
return
}
if (!this._pointerEvent) {
this.touchDeltaX = event.originalEvent.touches[0].pageX - this.touchStartX
this.touchDeltaX = event.originalEvent.touches[0].clientX - this.touchStartX
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment