mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-10 23:54:08 +02:00
14
js/dist/carousel.js
vendored
14
js/dist/carousel.js
vendored
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Bootstrap carousel.js v5.1.0 (https://getbootstrap.com/)
|
||||
* Bootstrap carousel.js v5.1.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.0): util/index.js
|
||||
* Bootstrap (v5.1.1): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -190,7 +190,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.0): carousel.js
|
||||
* Bootstrap (v5.1.1): carousel.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -415,8 +415,12 @@
|
||||
}
|
||||
|
||||
_addTouchEventListeners() {
|
||||
const hasPointerPenTouch = event => {
|
||||
return this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);
|
||||
};
|
||||
|
||||
const start = event => {
|
||||
if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
|
||||
if (hasPointerPenTouch(event)) {
|
||||
this.touchStartX = event.clientX;
|
||||
} else if (!this._pointerEvent) {
|
||||
this.touchStartX = event.touches[0].clientX;
|
||||
@@ -429,7 +433,7 @@
|
||||
};
|
||||
|
||||
const end = event => {
|
||||
if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
|
||||
if (hasPointerPenTouch(event)) {
|
||||
this.touchDeltaX = event.clientX - this.touchStartX;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user