aboutsummaryrefslogtreecommitdiff
path: root/js/src/carousel.js
diff options
context:
space:
mode:
authorPierre-Denis Vanduynslager <[email protected]>2017-01-15 10:33:54 -0500
committerPierre-Denis Vanduynslager <[email protected]>2017-01-15 10:33:54 -0500
commita85b80fa75aa9ecc7da252411f6209a002e4bdfb (patch)
tree90f7083626b4471afe47702bc8567a4918b0313b /js/src/carousel.js
parent4c2f5443596c39c551ebb7ec635d01a98e434189 (diff)
parent8fbd4aaa383e3506d2da3c2335eeb66f494f07ad (diff)
downloadbootstrap-a85b80fa75aa9ecc7da252411f6209a002e4bdfb.tar.xz
bootstrap-a85b80fa75aa9ecc7da252411f6209a002e4bdfb.zip
Merge branch 'twbs/v4-dev' into dropdown-keyboard
Diffstat (limited to 'js/src/carousel.js')
-rw-r--r--js/src/carousel.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js
index d27600c40..8a75cb240 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -137,7 +137,7 @@ const Carousel = (($) => {
if (this._isSliding) {
throw new Error('Carousel is sliding')
}
- this._slide(Direction.PREVIOUS)
+ this._slide(Direction.PREV)
}
pause(event) {
@@ -195,7 +195,7 @@ const Carousel = (($) => {
const direction = index > activeIndex ?
Direction.NEXT :
- Direction.PREVIOUS
+ Direction.PREV
this._slide(direction, this._items[index])
}
@@ -263,7 +263,7 @@ const Carousel = (($) => {
_getItemByDirection(direction, activeElement) {
const isNextDirection = direction === Direction.NEXT
- const isPrevDirection = direction === Direction.PREVIOUS
+ const isPrevDirection = direction === Direction.PREV
const activeIndex = this._getItemIndex(activeElement)
const lastItemIndex = this._items.length - 1
const isGoingToWrap = isPrevDirection && activeIndex === 0 ||
@@ -273,7 +273,7 @@ const Carousel = (($) => {
return activeElement
}
- const delta = direction === Direction.PREVIOUS ? -1 : 1
+ const delta = direction === Direction.PREV ? -1 : 1
const itemIndex = (activeIndex + delta) % this._items.length
return itemIndex === -1 ?