diff options
author | Pierre-Denis Vanduynslager <pierre.denis.vanduynslager@gmail.com> | 2017-01-15 05:46:03 +0300 |
---|---|---|
committer | Bardi Harborow <bardi@bardiharborow.com> | 2017-01-15 05:46:03 +0300 |
commit | 8fbd4aaa383e3506d2da3c2335eeb66f494f07ad (patch) | |
tree | 9071073bb240b864d7f48cb87b91eeb3c296e0f5 /js | |
parent | c80e13a48a50caecc3e0c7b2904655e8bdc95d9c (diff) |
Correct reference to Direction.PREV constant. (#21709)
Diffstat (limited to 'js')
-rw-r--r-- | js/src/carousel.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js index d27600c40b..8a75cb240e 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 ? |