Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/dist/carousel.js')
-rw-r--r--js/dist/carousel.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/js/dist/carousel.js b/js/dist/carousel.js
index e7a5bd3239..bd7a8509ab 100644
--- a/js/dist/carousel.js
+++ b/js/dist/carousel.js
@@ -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;
}