mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-12 08:34:08 +02:00
grunt
This commit is contained in:
13
js/dist/carousel.js
vendored
13
js/dist/carousel.js
vendored
@@ -272,9 +272,13 @@ var Carousel = function ($) {
|
||||
};
|
||||
|
||||
Carousel.prototype._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
|
||||
var targetIndex = this._getItemIndex(relatedTarget);
|
||||
var fromIndex = this._getItemIndex($(this._element).find(Selector.ACTIVE_ITEM)[0]);
|
||||
var slideEvent = $.Event(Event.SLIDE, {
|
||||
relatedTarget: relatedTarget,
|
||||
direction: eventDirectionName
|
||||
direction: eventDirectionName,
|
||||
from: fromIndex,
|
||||
to: targetIndex
|
||||
});
|
||||
|
||||
$(this._element).trigger(slideEvent);
|
||||
@@ -298,8 +302,9 @@ var Carousel = function ($) {
|
||||
var _this3 = this;
|
||||
|
||||
var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
|
||||
var activeElementIndex = this._getItemIndex(activeElement);
|
||||
var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
|
||||
|
||||
var nextElementIndex = this._getItemIndex(nextElement);
|
||||
var isCycling = Boolean(this._interval);
|
||||
|
||||
var directionalClassName = void 0;
|
||||
@@ -341,7 +346,9 @@ var Carousel = function ($) {
|
||||
|
||||
var slidEvent = $.Event(Event.SLID, {
|
||||
relatedTarget: nextElement,
|
||||
direction: eventDirectionName
|
||||
direction: eventDirectionName,
|
||||
from: activeElementIndex,
|
||||
to: nextElementIndex
|
||||
});
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {
|
||||
|
2
js/dist/carousel.js.map
vendored
2
js/dist/carousel.js.map
vendored
File diff suppressed because one or more lines are too long
10
js/dist/modal.js
vendored
10
js/dist/modal.js
vendored
@@ -209,6 +209,10 @@ var Modal = function ($) {
|
||||
this._scrollbarWidth = null;
|
||||
};
|
||||
|
||||
Modal.prototype.handleUpdate = function handleUpdate() {
|
||||
this._adjustDialog();
|
||||
};
|
||||
|
||||
// private
|
||||
|
||||
Modal.prototype._getConfig = function _getConfig(config) {
|
||||
@@ -290,7 +294,7 @@ var Modal = function ($) {
|
||||
|
||||
if (this._isShown) {
|
||||
$(window).on(Event.RESIZE, function (event) {
|
||||
return _this6._handleUpdate(event);
|
||||
return _this6.handleUpdate(event);
|
||||
});
|
||||
} else {
|
||||
$(window).off(Event.RESIZE);
|
||||
@@ -391,10 +395,6 @@ var Modal = function ($) {
|
||||
// todo (fat): these should probably be refactored out of modal.js
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
Modal.prototype._handleUpdate = function _handleUpdate() {
|
||||
this._adjustDialog();
|
||||
};
|
||||
|
||||
Modal.prototype._adjustDialog = function _adjustDialog() {
|
||||
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
|
||||
|
||||
|
2
js/dist/modal.js.map
vendored
2
js/dist/modal.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user