diff options
| author | XhmikosR <[email protected]> | 2020-06-20 19:00:53 +0300 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2020-07-12 15:52:25 +0300 |
| commit | f15af45c6eb7d977923c339d686023e1ce4d011c (patch) | |
| tree | 32d2986eb24a38e7ea0ebaf747bd56518f291f63 /js/src/carousel.js | |
| parent | 91c11d646538c634e24ea85c5f985b2f32f8fe96 (diff) | |
| download | bootstrap-f15af45c6eb7d977923c339d686023e1ce4d011c.tar.xz bootstrap-f15af45c6eb7d977923c339d686023e1ce4d011c.zip | |
Unbreak lines.
Diffstat (limited to 'js/src/carousel.js')
| -rw-r--r-- | js/src/carousel.js | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js index 58382f6e2..b40410cd7 100644 --- a/js/src/carousel.js +++ b/js/src/carousel.js @@ -263,15 +263,12 @@ class Carousel { _addEventListeners() { if (this._config.keyboard) { - EventHandler - .on(this._element, EVENT_KEYDOWN, event => this._keydown(event)) + EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event)) } if (this._config.pause === 'hover') { - EventHandler - .on(this._element, EVENT_MOUSEENTER, event => this.pause(event)) - EventHandler - .on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event)) + EventHandler.on(this._element, EVENT_MOUSEENTER, event => this.pause(event)) + EventHandler.on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event)) } if (this._config.touch && this._touchSupported) { @@ -476,24 +473,23 @@ class Carousel { const transitionDuration = getTransitionDurationFromElement(activeElement) - EventHandler - .one(activeElement, TRANSITION_END, () => { - nextElement.classList.remove(directionalClassName, orderClassName) - nextElement.classList.add(CLASS_NAME_ACTIVE) + EventHandler.one(activeElement, TRANSITION_END, () => { + nextElement.classList.remove(directionalClassName, orderClassName) + nextElement.classList.add(CLASS_NAME_ACTIVE) - activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName) + activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName) - this._isSliding = false + this._isSliding = false - setTimeout(() => { - EventHandler.trigger(this._element, EVENT_SLID, { - relatedTarget: nextElement, - direction: eventDirectionName, - from: activeElementIndex, - to: nextElementIndex - }) - }, 0) - }) + setTimeout(() => { + EventHandler.trigger(this._element, EVENT_SLID, { + relatedTarget: nextElement, + direction: eventDirectionName, + from: activeElementIndex, + to: nextElementIndex + }) + }, 0) + }) emulateTransitionEnd(activeElement, transitionDuration) } else { @@ -593,8 +589,7 @@ class Carousel { * ------------------------------------------------------------------------ */ -EventHandler - .on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler) +EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler) EventHandler.on(window, EVENT_LOAD_DATA_API, () => { const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE) |
