aboutsummaryrefslogtreecommitdiff
path: root/js/src/carousel.js
diff options
context:
space:
mode:
authorGaĆ«l Poupard <[email protected]>2020-06-26 17:06:20 +0300
committerXhmikosR <[email protected]>2020-12-04 07:52:03 +0200
commit9488978fb55286ba83e8193a871d1ff9815045b9 (patch)
treeabb461d46722f107e54156709c88cf37ed9e24a6 /js/src/carousel.js
parent71ecc3323fb60ea05456470d10d17b614fe6dc04 (diff)
downloadbootstrap-9488978fb55286ba83e8193a871d1ff9815045b9.tar.xz
bootstrap-9488978fb55286ba83e8193a871d1ff9815045b9.zip
feat(RTL): implement RTL
Using RTLCSS directives, renaming things to use logical names and following best practices.
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 9c6fb53ee..d8ad3a135 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -79,8 +79,8 @@ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const CLASS_NAME_CAROUSEL = 'carousel'
const CLASS_NAME_ACTIVE = 'active'
const CLASS_NAME_SLIDE = 'slide'
-const CLASS_NAME_RIGHT = 'carousel-item-right'
-const CLASS_NAME_LEFT = 'carousel-item-left'
+const CLASS_NAME_END = 'carousel-item-end'
+const CLASS_NAME_START = 'carousel-item-start'
const CLASS_NAME_NEXT = 'carousel-item-next'
const CLASS_NAME_PREV = 'carousel-item-prev'
const CLASS_NAME_POINTER_EVENT = 'pointer-event'
@@ -442,11 +442,11 @@ class Carousel extends BaseComponent {
let eventDirectionName
if (direction === DIRECTION_NEXT) {
- directionalClassName = CLASS_NAME_LEFT
+ directionalClassName = CLASS_NAME_START
orderClassName = CLASS_NAME_NEXT
eventDirectionName = DIRECTION_LEFT
} else {
- directionalClassName = CLASS_NAME_RIGHT
+ directionalClassName = CLASS_NAME_END
orderClassName = CLASS_NAME_PREV
eventDirectionName = DIRECTION_RIGHT
}