1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-27 13:59:06 +02:00

add getters for Version and Default where applicable

add modal my gawd
This commit is contained in:
fat
2015-05-10 19:45:38 -07:00
parent bbb97a8660
commit ca9c850ebb
29 changed files with 1114 additions and 1153 deletions

View File

@@ -23,7 +23,7 @@ const Carousel = (($) => {
const JQUERY_NO_CONFLICT = $.fn[NAME]
const TRANSITION_DURATION = 600
const Defaults = {
const Default = {
interval : 5000,
keyboard : true,
slide : false,
@@ -72,7 +72,6 @@ const Carousel = (($) => {
class Carousel {
constructor(element, config) {
this._items = null
this._interval = null
this._activeElement = null
@@ -85,7 +84,17 @@ const Carousel = (($) => {
this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0]
this._addEventListeners()
}
// getters
static get VERSION() {
return VERSION
}
static get Default() {
return Default
}
@@ -331,7 +340,7 @@ const Carousel = (($) => {
static _jQueryInterface(config) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
let _config = $.extend({}, Defaults, $(this).data())
let _config = $.extend({}, Default, $(this).data())
if (typeof config === 'object') {
$.extend(_config, config)