mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-10 23:54:08 +02:00
23
js/dist/carousel.js
vendored
23
js/dist/carousel.js
vendored
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Bootstrap carousel.js v5.0.0-beta3 (https://getbootstrap.com/)
|
||||
* Bootstrap carousel.js v5.0.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0-beta3): util/index.js
|
||||
* Bootstrap (v5.0.0): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
|
||||
if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
|
||||
hrefAttr = '#' + hrefAttr.split('#')[1];
|
||||
hrefAttr = `#${hrefAttr.split('#')[1]}`;
|
||||
}
|
||||
|
||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
||||
@@ -117,7 +117,7 @@
|
||||
const valueType = value && isElement(value) ? 'element' : toType(value);
|
||||
|
||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
||||
throw new TypeError(`${componentName.toUpperCase()}: ` + `Option "${property}" provided type "${valueType}" ` + `but expected type "${expectedTypes}".`);
|
||||
throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -180,7 +180,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.0.0-beta3): carousel.js
|
||||
* Bootstrap (v5.0.0): carousel.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -363,7 +363,6 @@
|
||||
}
|
||||
|
||||
dispose() {
|
||||
EventHandler__default['default'].off(this._element, EVENT_KEY);
|
||||
this._items = null;
|
||||
this._config = null;
|
||||
this._interval = null;
|
||||
@@ -478,11 +477,11 @@
|
||||
if (event.key === ARROW_LEFT_KEY) {
|
||||
event.preventDefault();
|
||||
|
||||
this._slide(DIRECTION_LEFT);
|
||||
this._slide(DIRECTION_RIGHT);
|
||||
} else if (event.key === ARROW_RIGHT_KEY) {
|
||||
event.preventDefault();
|
||||
|
||||
this._slide(DIRECTION_RIGHT);
|
||||
this._slide(DIRECTION_LEFT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -644,10 +643,10 @@
|
||||
}
|
||||
|
||||
if (isRTL()) {
|
||||
return direction === DIRECTION_RIGHT ? ORDER_PREV : ORDER_NEXT;
|
||||
return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;
|
||||
}
|
||||
|
||||
return direction === DIRECTION_RIGHT ? ORDER_NEXT : ORDER_PREV;
|
||||
return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;
|
||||
}
|
||||
|
||||
_orderToDirection(order) {
|
||||
@@ -656,10 +655,10 @@
|
||||
}
|
||||
|
||||
if (isRTL()) {
|
||||
return order === ORDER_NEXT ? DIRECTION_LEFT : DIRECTION_RIGHT;
|
||||
return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;
|
||||
}
|
||||
|
||||
return order === ORDER_NEXT ? DIRECTION_RIGHT : DIRECTION_LEFT;
|
||||
return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;
|
||||
} // Static
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user