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:
authorJohann-S <johann.servoire@gmail.com>2018-11-14 12:16:56 +0300
committerJohann-S <johann.servoire@gmail.com>2018-11-14 12:54:50 +0300
commit9201a805101943f9ec088639d520d7d2874bbed1 (patch)
treeb103dea4a9d52bac3bb849c6c14277f4000a1f9c /js/src/carousel.js
parentfab1dea92773e796a75ac4a2fadb645714ac80ce (diff)
some cleaning and changes for readability
Diffstat (limited to 'js/src/carousel.js')
-rw-r--r--js/src/carousel.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js
index 550c48eb55..734e155965 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -60,10 +60,7 @@ const Event = {
TOUCHMOVE : `touchmove${EVENT_KEY}`,
TOUCHEND : `touchend${EVENT_KEY}`,
POINTERDOWN : `pointerdown${EVENT_KEY}`,
- POINTERMOVE : `pointermove${EVENT_KEY}`,
POINTERUP : `pointerup${EVENT_KEY}`,
- POINTERLEAVE : `pointerleave${EVENT_KEY}`,
- POINTERCANCEL : `pointercancel${EVENT_KEY}`,
DRAG_START : `dragstart${EVENT_KEY}`,
LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`,
CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`
@@ -280,7 +277,7 @@ class Carousel {
}
const start = (event) => {
- if (this._pointerEvent && (event.originalEvent.pointerType === PointerType.TOUCH || event.originalEvent.pointerType === PointerType.PEN)) {
+ if (this._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
this.touchStartX = event.originalEvent.clientX
} else if (!this._pointerEvent) {
this.touchStartX = event.originalEvent.touches[0].clientX
@@ -297,7 +294,7 @@ class Carousel {
}
const end = (event) => {
- if (this._pointerEvent && (event.originalEvent.pointerType === PointerType.TOUCH || event.originalEvent.pointerType === PointerType.PEN)) {
+ if (this._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
this.touchDeltaX = event.originalEvent.clientX - this.touchStartX
}