diff options
author | Mario <mario@mariovavti.com> | 2021-10-08 12:24:19 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-10-08 12:24:19 +0000 |
commit | e6dac085cb1d601da1fc63bfd59d811612fa6ef4 (patch) | |
tree | f5b704b613c9c8d347857b4e7f8dd0b19cdd7df3 /vendor/twbs/bootstrap/js/src/carousel.js | |
parent | f5f357060bf0ebcb0b8352519375953d993437e7 (diff) | |
download | volse-hubzilla-e6dac085cb1d601da1fc63bfd59d811612fa6ef4.tar.gz volse-hubzilla-e6dac085cb1d601da1fc63bfd59d811612fa6ef4.tar.bz2 volse-hubzilla-e6dac085cb1d601da1fc63bfd59d811612fa6ef4.zip |
update composer libs
Diffstat (limited to 'vendor/twbs/bootstrap/js/src/carousel.js')
-rw-r--r-- | vendor/twbs/bootstrap/js/src/carousel.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/vendor/twbs/bootstrap/js/src/carousel.js b/vendor/twbs/bootstrap/js/src/carousel.js index fe43f53eb..96812d3b6 100644 --- a/vendor/twbs/bootstrap/js/src/carousel.js +++ b/vendor/twbs/bootstrap/js/src/carousel.js @@ -1,6 +1,6 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.0.2): carousel.js + * Bootstrap (v5.1.2): carousel.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ @@ -260,8 +260,13 @@ class Carousel extends BaseComponent { } _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 @@ -276,7 +281,7 @@ class Carousel extends BaseComponent { } 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 } @@ -300,7 +305,7 @@ class Carousel extends BaseComponent { } SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => { - EventHandler.on(itemImg, EVENT_DRAG_START, e => e.preventDefault()) + EventHandler.on(itemImg, EVENT_DRAG_START, event => event.preventDefault()) }) if (this._pointerEvent) { |