diff options
| author | Johann-S <[email protected]> | 2019-07-28 15:24:46 +0200 |
|---|---|---|
| committer | Johann-S <[email protected]> | 2019-07-29 11:34:12 +0200 |
| commit | dcba52677556bedb04a07825c2023e0beeea6f1e (patch) | |
| tree | ddf5bbf334408536c609f2ded245e119c1a9de17 /js/src/carousel/carousel.js | |
| parent | 144220f0c5777e07fb1832324d52a590bec363e2 (diff) | |
| download | bootstrap-dcba52677556bedb04a07825c2023e0beeea6f1e.tar.xz bootstrap-dcba52677556bedb04a07825c2023e0beeea6f1e.zip | |
remove underscore for static methods
Diffstat (limited to 'js/src/carousel/carousel.js')
| -rw-r--r-- | js/src/carousel/carousel.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/js/src/carousel/carousel.js b/js/src/carousel/carousel.js index af4229f07..0bac655ea 100644 --- a/js/src/carousel/carousel.js +++ b/js/src/carousel/carousel.js @@ -528,7 +528,7 @@ class Carousel { // Static - static _carouselInterface(element, config) { + static carouselInterface(element, config) { let data = Data.getData(element, DATA_KEY) let _config = { ...Default, @@ -562,13 +562,13 @@ class Carousel { } } - static _jQueryInterface(config) { + static jQueryInterface(config) { return this.each(function () { - Carousel._carouselInterface(this, config) + Carousel.carouselInterface(this, config) }) } - static _dataApiClickHandler(event) { + static dataApiClickHandler(event) { const target = getElementFromSelector(this) if (!target || !target.classList.contains(ClassName.CAROUSEL)) { @@ -585,7 +585,7 @@ class Carousel { config.interval = false } - Carousel._carouselInterface(target, config) + Carousel.carouselInterface(target, config) if (slideIndex) { Data.getData(target, DATA_KEY).to(slideIndex) @@ -594,7 +594,7 @@ class Carousel { event.preventDefault() } - static _getInstance(element) { + static getInstance(element) { return Data.getData(element, DATA_KEY) } } @@ -606,12 +606,12 @@ class Carousel { */ EventHandler - .on(document, Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler) + .on(document, Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel.dataApiClickHandler) EventHandler.on(window, Event.LOAD_DATA_API, () => { const carousels = makeArray(SelectorEngine.find(Selector.DATA_RIDE)) for (let i = 0, len = carousels.length; i < len; i++) { - Carousel._carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY)) + Carousel.carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY)) } }) @@ -624,11 +624,11 @@ EventHandler.on(window, Event.LOAD_DATA_API, () => { /* istanbul ignore if */ if (typeof $ !== 'undefined') { const JQUERY_NO_CONFLICT = $.fn[NAME] - $.fn[NAME] = Carousel._jQueryInterface + $.fn[NAME] = Carousel.jQueryInterface $.fn[NAME].Constructor = Carousel $.fn[NAME].noConflict = () => { $.fn[NAME] = JQUERY_NO_CONFLICT - return Carousel._jQueryInterface + return Carousel.jQueryInterface } } |
