mirror of
https://github.com/tenrok/OverlayScrollbars.git
synced 2026-06-23 02:40:35 +03:00
version 1.6.3
This commit is contained in:
@@ -2,13 +2,13 @@
|
|||||||
* OverlayScrollbars
|
* OverlayScrollbars
|
||||||
* https://github.com/KingSora/OverlayScrollbars
|
* https://github.com/KingSora/OverlayScrollbars
|
||||||
*
|
*
|
||||||
* Version: 1.6.2
|
* Version: 1.6.3
|
||||||
*
|
*
|
||||||
* Copyright KingSora.
|
* Copyright KingSora.
|
||||||
* https://github.com/KingSora
|
* https://github.com/KingSora
|
||||||
*
|
*
|
||||||
* Released under the MIT license.
|
* Released under the MIT license.
|
||||||
* Date: 16.01.2019
|
* Date: 31.01.2019
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
+21
-9
@@ -2,13 +2,13 @@
|
|||||||
* OverlayScrollbars
|
* OverlayScrollbars
|
||||||
* https://github.com/KingSora/OverlayScrollbars
|
* https://github.com/KingSora/OverlayScrollbars
|
||||||
*
|
*
|
||||||
* Version: 1.6.2
|
* Version: 1.6.3
|
||||||
*
|
*
|
||||||
* Copyright KingSora.
|
* Copyright KingSora.
|
||||||
* https://github.com/KingSora
|
* https://github.com/KingSora
|
||||||
*
|
*
|
||||||
* Released under the MIT license.
|
* Released under the MIT license.
|
||||||
* Date: 16.01.2019
|
* Date: 31.01.2019
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
@@ -3205,10 +3205,13 @@
|
|||||||
//activate or deactivate size auto capability
|
//activate or deactivate size auto capability
|
||||||
if (sizeAutoCapableChanged) {
|
if (sizeAutoCapableChanged) {
|
||||||
if (sizeAutoCapable) {
|
if (sizeAutoCapable) {
|
||||||
if (_contentGlueElement === undefined) {
|
if (!_contentGlueElement) {
|
||||||
_contentGlueElement = FRAMEWORK(generateDiv(_classNameContentGlueElement));
|
_contentGlueElement = FRAMEWORK(generateDiv(_classNameContentGlueElement));
|
||||||
_paddingElement.before(_contentGlueElement);
|
_paddingElement.before(_contentGlueElement);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
_contentGlueElement.show();
|
||||||
|
}
|
||||||
if (_sizeAutoObserverAdded) {
|
if (_sizeAutoObserverAdded) {
|
||||||
_sizeAutoObserverElement.show();
|
_sizeAutoObserverElement.show();
|
||||||
}
|
}
|
||||||
@@ -3241,6 +3244,8 @@
|
|||||||
else {
|
else {
|
||||||
if (_sizeAutoObserverAdded)
|
if (_sizeAutoObserverAdded)
|
||||||
_sizeAutoObserverElement.hide();
|
_sizeAutoObserverElement.hide();
|
||||||
|
if (_contentGlueElement)
|
||||||
|
_contentGlueElement.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3307,7 +3312,7 @@
|
|||||||
var wasWidthAuto = !widthAuto && _widthAutoCache;
|
var wasWidthAuto = !widthAuto && _widthAutoCache;
|
||||||
|
|
||||||
//detect height auto:
|
//detect height auto:
|
||||||
var heightAuto = _sizeAutoObserverAdded && !displayIsHidden ? (MATH.round(sizeAutoObserverElementBCRect.bottom - sizeAutoObserverElementBCRect.top) === 0) /* && (!paddingAbsolute && (_msieVersion > 9 || !_msieVersion) ? true : true) */ : false;
|
var heightAuto = _sizeAutoObserverAdded && sizeAutoCapable && !displayIsHidden ? (MATH.round(sizeAutoObserverElementBCRect.bottom - sizeAutoObserverElementBCRect.top) === 0) /* && (!paddingAbsolute && (_msieVersion > 9 || !_msieVersion) ? true : true) */ : false;
|
||||||
var heightAutoChanged = checkCacheSingle(heightAuto, _heightAutoCache, force);
|
var heightAutoChanged = checkCacheSingle(heightAuto, _heightAutoCache, force);
|
||||||
var wasHeightAuto = !heightAuto && _heightAutoCache;
|
var wasHeightAuto = !heightAuto && _heightAutoCache;
|
||||||
|
|
||||||
@@ -3464,6 +3469,9 @@
|
|||||||
contentElementCSS[_strWidth] = _strAuto;
|
contentElementCSS[_strWidth] = _strAuto;
|
||||||
contentElementCSS[_strFloat] = isRTLRight;
|
contentElementCSS[_strFloat] = isRTLRight;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
contentGlueElementCSS[_strWidth] = _strEmpty;
|
||||||
|
}
|
||||||
if (heightAuto) {
|
if (heightAuto) {
|
||||||
if (!cssMaxValue.ch)
|
if (!cssMaxValue.ch)
|
||||||
contentElementCSS[_strMaxMinus + _strHeight] = _strEmpty;
|
contentElementCSS[_strMaxMinus + _strHeight] = _strEmpty;
|
||||||
@@ -3471,6 +3479,9 @@
|
|||||||
//contentGlueElementCSS[_strHeight] = _isTextarea && textareaDynHeight ? textareaSize.dh : _strAuto;
|
//contentGlueElementCSS[_strHeight] = _isTextarea && textareaDynHeight ? textareaSize.dh : _strAuto;
|
||||||
contentGlueElementCSS[_strHeight] = _isTextarea ? textareaDynHeight ? textareaSize.dh : _strAuto : _contentElement[0][LEXICON.cH];
|
contentGlueElementCSS[_strHeight] = _isTextarea ? textareaDynHeight ? textareaSize.dh : _strAuto : _contentElement[0][LEXICON.cH];
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
contentGlueElementCSS[_strHeight] = _strEmpty;
|
||||||
|
}
|
||||||
if (sizeAutoCapable)
|
if (sizeAutoCapable)
|
||||||
_contentGlueElement.css(contentGlueElementCSS);
|
_contentGlueElement.css(contentGlueElementCSS);
|
||||||
_contentElement.css(contentElementCSS);
|
_contentElement.css(contentElementCSS);
|
||||||
@@ -3480,7 +3491,7 @@
|
|||||||
contentGlueElementCSS = {};
|
contentGlueElementCSS = {};
|
||||||
|
|
||||||
//if [content(host) client / scroll size, or target element direction, or content(host) max-sizes] changed, or force is true
|
//if [content(host) client / scroll size, or target element direction, or content(host) max-sizes] changed, or force is true
|
||||||
if (hostSizeChanged || contentSizeChanged || cssDirectionChanged || boxSizingChanged || paddingAbsoluteChanged || widthAutoChanged || widthAuto || heightAutoChanged || heightAuto || cssMaxValue.c || ignoreOverlayScrollbarHidingChanged || overflowBehaviorChanged || clipAlwaysChanged || resizeChanged || scrollbarsVisibilityChanged || textareaDynWidthChanged || textareaDynHeightChanged || textareaAutoWrappingChanged || force) {
|
if (hostSizeChanged || contentSizeChanged || cssDirectionChanged || boxSizingChanged || paddingAbsoluteChanged || widthAutoChanged || widthAuto || heightAutoChanged || heightAuto || cssMaxValue.c || ignoreOverlayScrollbarHidingChanged || overflowBehaviorChanged || clipAlwaysChanged || resizeChanged || scrollbarsVisibilityChanged || scrollbarsAutoHideChanged || scrollbarsDragScrollingChanged || scrollbarsClickScrollingChanged || textareaDynWidthChanged || textareaDynHeightChanged || textareaAutoWrappingChanged || force) {
|
||||||
var strOverflow = 'overflow';
|
var strOverflow = 'overflow';
|
||||||
var strOverflowX = strOverflow + '-x';
|
var strOverflowX = strOverflow + '-x';
|
||||||
var strOverflowY = strOverflow + '-y';
|
var strOverflowY = strOverflow + '-y';
|
||||||
@@ -5195,12 +5206,13 @@
|
|||||||
var isString = type(force) == TYPES.s;
|
var isString = type(force) == TYPES.s;
|
||||||
var imgElementSelector = 'img';
|
var imgElementSelector = 'img';
|
||||||
var imgElementLoadEvent = 'load';
|
var imgElementLoadEvent = 'load';
|
||||||
|
var isPlus = isString && force.slice(-1) == '+';
|
||||||
if(isString) {
|
if(isString) {
|
||||||
if (force.indexOf(_strAuto) === 0) {
|
if (force.indexOf(_strAuto) === 0) {
|
||||||
attrsChanged = meaningfulAttrsChanged();
|
attrsChanged = meaningfulAttrsChanged();
|
||||||
contentSizeC = updateAutoContentSizeChanged();
|
contentSizeC = updateAutoContentSizeChanged();
|
||||||
if (attrsChanged || contentSizeC)
|
if (attrsChanged || contentSizeC || isPlus)
|
||||||
update(false, contentSizeC, false, force.slice(-1) == "+");
|
update(false, contentSizeC, false, isPlus);
|
||||||
}
|
}
|
||||||
else if (force === 'zoom')
|
else if (force === 'zoom')
|
||||||
update(true, true);
|
update(true, true);
|
||||||
@@ -5510,7 +5522,7 @@
|
|||||||
var getFinalScroll = function (isX, rawScroll) {
|
var getFinalScroll = function (isX, rawScroll) {
|
||||||
var isString = type(rawScroll) == TYPES.s;
|
var isString = type(rawScroll) == TYPES.s;
|
||||||
if(isString)
|
if(isString)
|
||||||
_base.update(_strAuto + "+");
|
_base.update(_strAuto + '+');
|
||||||
var operator;
|
var operator;
|
||||||
var amount;
|
var amount;
|
||||||
var scrollInfo = isX ? _scrollHorizontalInfo : _scrollVerticalInfo;
|
var scrollInfo = isX ? _scrollHorizontalInfo : _scrollVerticalInfo;
|
||||||
@@ -5642,7 +5654,7 @@
|
|||||||
if (finalElement[strLength] === 0)
|
if (finalElement[strLength] === 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_base.update(_strAuto + "+");
|
_base.update(_strAuto + '+');
|
||||||
|
|
||||||
//margin can be [ boolean, number, array of 2, array of 4, object ]
|
//margin can be [ boolean, number, array of 2, array of 4, object ]
|
||||||
if (marginType == TYPES.n || marginType == TYPES.b)
|
if (marginType == TYPES.n || marginType == TYPES.b)
|
||||||
|
|||||||
Vendored
+3
-3
File diff suppressed because one or more lines are too long
@@ -2,13 +2,13 @@
|
|||||||
* OverlayScrollbars
|
* OverlayScrollbars
|
||||||
* https://github.com/KingSora/OverlayScrollbars
|
* https://github.com/KingSora/OverlayScrollbars
|
||||||
*
|
*
|
||||||
* Version: 1.6.2
|
* Version: 1.6.3
|
||||||
*
|
*
|
||||||
* Copyright KingSora.
|
* Copyright KingSora.
|
||||||
* https://github.com/KingSora
|
* https://github.com/KingSora
|
||||||
*
|
*
|
||||||
* Released under the MIT license.
|
* Released under the MIT license.
|
||||||
* Date: 16.01.2019
|
* Date: 31.01.2019
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
@@ -2127,10 +2127,13 @@
|
|||||||
//activate or deactivate size auto capability
|
//activate or deactivate size auto capability
|
||||||
if (sizeAutoCapableChanged) {
|
if (sizeAutoCapableChanged) {
|
||||||
if (sizeAutoCapable) {
|
if (sizeAutoCapable) {
|
||||||
if (_contentGlueElement === undefined) {
|
if (!_contentGlueElement) {
|
||||||
_contentGlueElement = FRAMEWORK(generateDiv(_classNameContentGlueElement));
|
_contentGlueElement = FRAMEWORK(generateDiv(_classNameContentGlueElement));
|
||||||
_paddingElement.before(_contentGlueElement);
|
_paddingElement.before(_contentGlueElement);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
_contentGlueElement.show();
|
||||||
|
}
|
||||||
if (_sizeAutoObserverAdded) {
|
if (_sizeAutoObserverAdded) {
|
||||||
_sizeAutoObserverElement.show();
|
_sizeAutoObserverElement.show();
|
||||||
}
|
}
|
||||||
@@ -2163,6 +2166,8 @@
|
|||||||
else {
|
else {
|
||||||
if (_sizeAutoObserverAdded)
|
if (_sizeAutoObserverAdded)
|
||||||
_sizeAutoObserverElement.hide();
|
_sizeAutoObserverElement.hide();
|
||||||
|
if (_contentGlueElement)
|
||||||
|
_contentGlueElement.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2229,7 +2234,7 @@
|
|||||||
var wasWidthAuto = !widthAuto && _widthAutoCache;
|
var wasWidthAuto = !widthAuto && _widthAutoCache;
|
||||||
|
|
||||||
//detect height auto:
|
//detect height auto:
|
||||||
var heightAuto = _sizeAutoObserverAdded && !displayIsHidden ? (MATH.round(sizeAutoObserverElementBCRect.bottom - sizeAutoObserverElementBCRect.top) === 0) /* && (!paddingAbsolute && (_msieVersion > 9 || !_msieVersion) ? true : true) */ : false;
|
var heightAuto = _sizeAutoObserverAdded && sizeAutoCapable && !displayIsHidden ? (MATH.round(sizeAutoObserverElementBCRect.bottom - sizeAutoObserverElementBCRect.top) === 0) /* && (!paddingAbsolute && (_msieVersion > 9 || !_msieVersion) ? true : true) */ : false;
|
||||||
var heightAutoChanged = checkCacheSingle(heightAuto, _heightAutoCache, force);
|
var heightAutoChanged = checkCacheSingle(heightAuto, _heightAutoCache, force);
|
||||||
var wasHeightAuto = !heightAuto && _heightAutoCache;
|
var wasHeightAuto = !heightAuto && _heightAutoCache;
|
||||||
|
|
||||||
@@ -2386,6 +2391,9 @@
|
|||||||
contentElementCSS[_strWidth] = _strAuto;
|
contentElementCSS[_strWidth] = _strAuto;
|
||||||
contentElementCSS[_strFloat] = isRTLRight;
|
contentElementCSS[_strFloat] = isRTLRight;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
contentGlueElementCSS[_strWidth] = _strEmpty;
|
||||||
|
}
|
||||||
if (heightAuto) {
|
if (heightAuto) {
|
||||||
if (!cssMaxValue.ch)
|
if (!cssMaxValue.ch)
|
||||||
contentElementCSS[_strMaxMinus + _strHeight] = _strEmpty;
|
contentElementCSS[_strMaxMinus + _strHeight] = _strEmpty;
|
||||||
@@ -2393,6 +2401,9 @@
|
|||||||
//contentGlueElementCSS[_strHeight] = _isTextarea && textareaDynHeight ? textareaSize.dh : _strAuto;
|
//contentGlueElementCSS[_strHeight] = _isTextarea && textareaDynHeight ? textareaSize.dh : _strAuto;
|
||||||
contentGlueElementCSS[_strHeight] = _isTextarea ? textareaDynHeight ? textareaSize.dh : _strAuto : _contentElement[0][LEXICON.cH];
|
contentGlueElementCSS[_strHeight] = _isTextarea ? textareaDynHeight ? textareaSize.dh : _strAuto : _contentElement[0][LEXICON.cH];
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
contentGlueElementCSS[_strHeight] = _strEmpty;
|
||||||
|
}
|
||||||
if (sizeAutoCapable)
|
if (sizeAutoCapable)
|
||||||
_contentGlueElement.css(contentGlueElementCSS);
|
_contentGlueElement.css(contentGlueElementCSS);
|
||||||
_contentElement.css(contentElementCSS);
|
_contentElement.css(contentElementCSS);
|
||||||
@@ -2402,7 +2413,7 @@
|
|||||||
contentGlueElementCSS = {};
|
contentGlueElementCSS = {};
|
||||||
|
|
||||||
//if [content(host) client / scroll size, or target element direction, or content(host) max-sizes] changed, or force is true
|
//if [content(host) client / scroll size, or target element direction, or content(host) max-sizes] changed, or force is true
|
||||||
if (hostSizeChanged || contentSizeChanged || cssDirectionChanged || boxSizingChanged || paddingAbsoluteChanged || widthAutoChanged || widthAuto || heightAutoChanged || heightAuto || cssMaxValue.c || ignoreOverlayScrollbarHidingChanged || overflowBehaviorChanged || clipAlwaysChanged || resizeChanged || scrollbarsVisibilityChanged || textareaDynWidthChanged || textareaDynHeightChanged || textareaAutoWrappingChanged || force) {
|
if (hostSizeChanged || contentSizeChanged || cssDirectionChanged || boxSizingChanged || paddingAbsoluteChanged || widthAutoChanged || widthAuto || heightAutoChanged || heightAuto || cssMaxValue.c || ignoreOverlayScrollbarHidingChanged || overflowBehaviorChanged || clipAlwaysChanged || resizeChanged || scrollbarsVisibilityChanged || scrollbarsAutoHideChanged || scrollbarsDragScrollingChanged || scrollbarsClickScrollingChanged || textareaDynWidthChanged || textareaDynHeightChanged || textareaAutoWrappingChanged || force) {
|
||||||
var strOverflow = 'overflow';
|
var strOverflow = 'overflow';
|
||||||
var strOverflowX = strOverflow + '-x';
|
var strOverflowX = strOverflow + '-x';
|
||||||
var strOverflowY = strOverflow + '-y';
|
var strOverflowY = strOverflow + '-y';
|
||||||
@@ -4117,12 +4128,13 @@
|
|||||||
var isString = type(force) == TYPES.s;
|
var isString = type(force) == TYPES.s;
|
||||||
var imgElementSelector = 'img';
|
var imgElementSelector = 'img';
|
||||||
var imgElementLoadEvent = 'load';
|
var imgElementLoadEvent = 'load';
|
||||||
|
var isPlus = isString && force.slice(-1) == '+';
|
||||||
if(isString) {
|
if(isString) {
|
||||||
if (force.indexOf(_strAuto) === 0) {
|
if (force.indexOf(_strAuto) === 0) {
|
||||||
attrsChanged = meaningfulAttrsChanged();
|
attrsChanged = meaningfulAttrsChanged();
|
||||||
contentSizeC = updateAutoContentSizeChanged();
|
contentSizeC = updateAutoContentSizeChanged();
|
||||||
if (attrsChanged || contentSizeC)
|
if (attrsChanged || contentSizeC || isPlus)
|
||||||
update(false, contentSizeC, false, force.slice(-1) == "+");
|
update(false, contentSizeC, false, isPlus);
|
||||||
}
|
}
|
||||||
else if (force === 'zoom')
|
else if (force === 'zoom')
|
||||||
update(true, true);
|
update(true, true);
|
||||||
@@ -4432,7 +4444,7 @@
|
|||||||
var getFinalScroll = function (isX, rawScroll) {
|
var getFinalScroll = function (isX, rawScroll) {
|
||||||
var isString = type(rawScroll) == TYPES.s;
|
var isString = type(rawScroll) == TYPES.s;
|
||||||
if(isString)
|
if(isString)
|
||||||
_base.update(_strAuto + "+");
|
_base.update(_strAuto + '+');
|
||||||
var operator;
|
var operator;
|
||||||
var amount;
|
var amount;
|
||||||
var scrollInfo = isX ? _scrollHorizontalInfo : _scrollVerticalInfo;
|
var scrollInfo = isX ? _scrollHorizontalInfo : _scrollVerticalInfo;
|
||||||
@@ -4564,7 +4576,7 @@
|
|||||||
if (finalElement[strLength] === 0)
|
if (finalElement[strLength] === 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_base.update(_strAuto + "+");
|
_base.update(_strAuto + '+');
|
||||||
|
|
||||||
//margin can be [ boolean, number, array of 2, array of 4, object ]
|
//margin can be [ boolean, number, array of 2, array of 4, object ]
|
||||||
if (marginType == TYPES.n || marginType == TYPES.b)
|
if (marginType == TYPES.n || marginType == TYPES.b)
|
||||||
|
|||||||
Vendored
+3
-3
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name":"overlayscrollbars",
|
"name":"overlayscrollbars",
|
||||||
"version":"1.6.2",
|
"version":"1.6.3",
|
||||||
"description":"A javascript scrollbar plugin which hides native scrollbars, provides custom styleable overlay scrollbars and keeps the native functionality and feeling.",
|
"description":"A javascript scrollbar plugin which hides native scrollbars, provides custom styleable overlay scrollbars and keeps the native functionality and feeling.",
|
||||||
"keywords":[
|
"keywords":[
|
||||||
"overlayscrollbars",
|
"overlayscrollbars",
|
||||||
|
|||||||
Reference in New Issue
Block a user