mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-16 10:34:07 +02:00
grunt
This commit is contained in:
@@ -2307,10 +2307,14 @@ var ScrollSpy = function ($) {
|
|||||||
return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
|
return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ScrollSpy.prototype._getOffsetHeight = function _getOffsetHeight() {
|
||||||
|
return this._scrollElement === window ? window.innerHeight : this._scrollElement.offsetHeight;
|
||||||
|
};
|
||||||
|
|
||||||
ScrollSpy.prototype._process = function _process() {
|
ScrollSpy.prototype._process = function _process() {
|
||||||
var scrollTop = this._getScrollTop() + this._config.offset;
|
var scrollTop = this._getScrollTop() + this._config.offset;
|
||||||
var scrollHeight = this._getScrollHeight();
|
var scrollHeight = this._getScrollHeight();
|
||||||
var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight;
|
var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
|
||||||
|
|
||||||
if (this._scrollHeight !== scrollHeight) {
|
if (this._scrollHeight !== scrollHeight) {
|
||||||
this.refresh();
|
this.refresh();
|
||||||
@@ -2322,6 +2326,7 @@ var ScrollSpy = function ($) {
|
|||||||
if (this._activeTarget !== target) {
|
if (this._activeTarget !== target) {
|
||||||
this._activate(target);
|
this._activate(target);
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._activeTarget && scrollTop < this._offsets[0]) {
|
if (this._activeTarget && scrollTop < this._offsets[0]) {
|
||||||
|
4
dist/js/bootstrap.min.js
vendored
4
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -2307,10 +2307,14 @@ var ScrollSpy = function ($) {
|
|||||||
return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
|
return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ScrollSpy.prototype._getOffsetHeight = function _getOffsetHeight() {
|
||||||
|
return this._scrollElement === window ? window.innerHeight : this._scrollElement.offsetHeight;
|
||||||
|
};
|
||||||
|
|
||||||
ScrollSpy.prototype._process = function _process() {
|
ScrollSpy.prototype._process = function _process() {
|
||||||
var scrollTop = this._getScrollTop() + this._config.offset;
|
var scrollTop = this._getScrollTop() + this._config.offset;
|
||||||
var scrollHeight = this._getScrollHeight();
|
var scrollHeight = this._getScrollHeight();
|
||||||
var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight;
|
var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
|
||||||
|
|
||||||
if (this._scrollHeight !== scrollHeight) {
|
if (this._scrollHeight !== scrollHeight) {
|
||||||
this.refresh();
|
this.refresh();
|
||||||
@@ -2322,6 +2326,7 @@ var ScrollSpy = function ($) {
|
|||||||
if (this._activeTarget !== target) {
|
if (this._activeTarget !== target) {
|
||||||
this._activate(target);
|
this._activate(target);
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._activeTarget && scrollTop < this._offsets[0]) {
|
if (this._activeTarget && scrollTop < this._offsets[0]) {
|
||||||
|
4
docs/dist/js/bootstrap.min.js
vendored
4
docs/dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user