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:
authorGeoSot <geo.sotis@gmail.com>2021-09-10 12:00:28 +0300
committerXhmikosR <xhmikosr@gmail.com>2022-02-19 15:52:36 +0300
commitd52f6c9de144ac2bc3eba002d3db538183c52465 (patch)
tree4883867b538dba3f8089e8245732735d8dfe3a8a
parent928bdcadc56cef30b4483616c4b2eee7cfa34bd2 (diff)
Carousel: change argument to `_setActiveIndicatorElement`, from element to index
-rw-r--r--js/src/carousel.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js
index b8d921e422..e3c8360482 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -291,7 +291,7 @@ class Carousel extends BaseComponent {
})
}
- _setActiveIndicatorElement(element) {
+ _setActiveIndicatorElement(index) {
if (!this._indicatorsElement) {
return
}
@@ -301,7 +301,7 @@ class Carousel extends BaseComponent {
activeIndicator.classList.remove(CLASS_NAME_ACTIVE)
activeIndicator.removeAttribute('aria-current')
- const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to="${this._getItemIndex(element)}"]`, this._indicatorsElement)
+ const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to="${index}"]`, this._indicatorsElement)
if (newActiveIndicator) {
newActiveIndicator.classList.add(CLASS_NAME_ACTIVE)
@@ -360,7 +360,7 @@ class Carousel extends BaseComponent {
this.pause()
}
- this._setActiveIndicatorElement(nextElement)
+ this._setActiveIndicatorElement(nextElementIndex)
this._activeElement = nextElement
nextElement.classList.add(orderClassName)