diff options
| author | Johann-S <[email protected]> | 2018-10-29 14:27:19 +0100 |
|---|---|---|
| committer | Johann-S <[email protected]> | 2018-10-29 14:49:29 +0100 |
| commit | 91f8077ed5cfff2ee61e50a39a25982ef8c4b01f (patch) | |
| tree | 07940c92446a0213a50ac186536e2bc6e54007d4 /js/src | |
| parent | bb0d6bf178de310176d914f73f2f649c229d8c4e (diff) | |
| download | bootstrap-91f8077ed5cfff2ee61e50a39a25982ef8c4b01f.tar.xz bootstrap-91f8077ed5cfff2ee61e50a39a25982ef8c4b01f.zip | |
add unit tests for our carousel
Diffstat (limited to 'js/src')
| -rw-r--r-- | js/src/carousel.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js index 989390aa0..3c7e2b2d9 100644 --- a/js/src/carousel.js +++ b/js/src/carousel.js @@ -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 |
