mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-08 22:56:46 +02:00
add unit tests for our carousel
This commit is contained in:
@@ -289,15 +289,13 @@ class Carousel {
|
||||
}
|
||||
|
||||
const move = (event) => {
|
||||
if (!this._pointerEvent) {
|
||||
event.preventDefault()
|
||||
event.preventDefault()
|
||||
|
||||
// ensure swiping with one touch and not pinching
|
||||
if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
|
||||
this.touchDeltaX = 0
|
||||
} else {
|
||||
this.touchDeltaX = event.originalEvent.touches[0].clientX - this.touchStartX
|
||||
}
|
||||
// ensure swiping with one touch and not pinching
|
||||
if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
|
||||
this.touchDeltaX = 0
|
||||
} else {
|
||||
this.touchDeltaX = event.originalEvent.touches[0].clientX - this.touchStartX
|
||||
}
|
||||
}
|
||||
|
||||
@@ -307,7 +305,6 @@ class Carousel {
|
||||
}
|
||||
|
||||
this._handleSwipe()
|
||||
|
||||
if (this._config.pause === 'hover') {
|
||||
// If it's a touch-enabled device, mouseenter/leave are fired as
|
||||
// part of the mouse compatibility events on first tap - the carousel
|
||||
|
Reference in New Issue
Block a user