Version 1.2.1

This commit is contained in:
Rene
2018-01-10 21:49:30 +01:00
parent 973596aa74
commit 2b3274580a
8 changed files with 41 additions and 33 deletions
+3 -3
View File
@@ -26,9 +26,9 @@ You can find a detailed documentation, demos and theme templates [here](https://
## Dependencies ## Dependencies
**The default version doesn't requires any dependencies!** The default plugin version doesn't requires any dependencies!
If you are using the jQuery dependent version it obviously requires [jQuery](https://jquery.com/) to work. **If you are using the jQuery dependent version it obviously requires [jQuery](https://jquery.com/) to work.**
It was tested with the jQuery versions: 1.9.1, 2.x, 3.x, and it won't work with jQuery slim. It was tested with the jQuery versions: 1.9.1, 2.x, 3.x, and it won't work with jQuery slim.
## Download ## Download
@@ -71,7 +71,7 @@ If you are using the jQuery version include [jQuery](https://jquery.com/) before
#### Javascript #### Javascript
Initialize the plugin after your document has been fully loaded. Initialize the plugin after your document has been fully loaded on the desired element.
Default initialization: Default initialization:
```js ```js
+5 -5
View File
@@ -2,13 +2,13 @@
* OverlayScrollbars * OverlayScrollbars
* https://github.com/KingSora/OverlayScrollbars * https://github.com/KingSora/OverlayScrollbars
* *
* Version: 1.2.0 * Version: 1.2.1
* *
* Copyright KingSora. * Copyright KingSora.
* https://github.com/KingSora * https://github.com/KingSora
* *
* Released under the MIT license. * Released under the MIT license.
* Date: 29.12.2017 * Date: 10.01.2018
*/ */
/* /*
@@ -42,7 +42,7 @@ body.os-dragging * {
#hs-dummy-scrollbar-size { #hs-dummy-scrollbar-size {
position: fixed; position: fixed;
opacity: 0; opacity: 0;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)';
visibility: hidden; visibility: hidden;
overflow: scroll; overflow: scroll;
height: 500px; height: 500px;
@@ -145,7 +145,7 @@ body.os-dragging * {
z-index: -1; z-index: -1;
pointer-events: none; pointer-events: none;
} }
.os-content > .os-textarea[wrap="off"] { .os-content > .os-textarea[wrap='off'] {
white-space: pre !important; white-space: pre !important;
margin: 0px !important; margin: 0px !important;
} }
@@ -276,7 +276,7 @@ html.os-html > .os-host > .os-scrollbar {
.os-scrollbar-corner { .os-scrollbar-corner {
position: absolute; position: absolute;
opacity: 1; opacity: 1;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';
z-index: 1; z-index: 1;
} }
.os-scrollbar-corner { .os-scrollbar-corner {
+3 -3
View File
File diff suppressed because one or more lines are too long
+11 -7
View File
@@ -2,22 +2,22 @@
* OverlayScrollbars * OverlayScrollbars
* https://github.com/KingSora/OverlayScrollbars * https://github.com/KingSora/OverlayScrollbars
* *
* Version: 1.2.0 * Version: 1.2.1
* *
* Copyright KingSora. * Copyright KingSora.
* https://github.com/KingSora * https://github.com/KingSora
* *
* Released under the MIT license. * Released under the MIT license.
* Date: 29.12.2017 * Date: 10.01.2018
*/ */
(function (global, factory) { (function (global, factory) {
if (typeof define === 'function' && define.amd) if (typeof define === 'function' && define.amd)
return define(function() { return factory(window, document, undefined); }); define(function() { return factory(global, global.document, undefined); });
else if (typeof exports === 'object') else if (typeof exports === 'object')
return module.exports = factory(window, document, undefined); module.exports = factory(global, global.document, undefined);
else else
return factory(window, document, undefined); factory(global, global.document, undefined, jQuery);
}(this, (function(window, document, undefined, jQuery) { }(this, (function(window, document, undefined, jQuery) {
'use-strict'; 'use-strict';
var PLUGINNAME = "OverlayScrollbars"; var PLUGINNAME = "OverlayScrollbars";
@@ -2384,6 +2384,7 @@
attributeOldValue: true, attributeOldValue: true,
subtree: !_isTextarea, subtree: !_isTextarea,
childList: !_isTextarea, childList: !_isTextarea,
characterData: !_isTextarea,
attributeFilter: _isTextarea ? ['wrap', 'cols', 'rows'] : ['id', 'class', 'style'] attributeFilter: _isTextarea ? ['wrap', 'cols', 'rows'] : ['id', 'class', 'style']
}); });
@@ -4180,7 +4181,9 @@
if (heightAuto) { if (heightAuto) {
if (!cssMaxValue.ch) if (!cssMaxValue.ch)
contentElementCSS[_strMaxMinus + _strHeight] = _strEmpty; contentElementCSS[_strMaxMinus + _strHeight] = _strEmpty;
contentGlueElementCSS[_strHeight] = _isTextarea && textareaDynHeight ? textareaSize.dh : _strAuto; //fix dyn height collapse bug: (doesn't works for width!)
//contentGlueElementCSS[_strHeight] = _isTextarea && textareaDynHeight ? textareaSize.dh : _strAuto;
contentGlueElementCSS[_strHeight] = _isTextarea ? textareaDynHeight ? textareaSize.dh : _strAuto : _contentElement[0].clientHeight;
} }
if (sizeAutoCapable) if (sizeAutoCapable)
_contentGlueElement.css(contentGlueElementCSS); _contentGlueElement.css(contentGlueElementCSS);
@@ -5749,6 +5752,7 @@
* @param newDefaultOptions The object with which the default options shall be extended. * @param newDefaultOptions The object with which the default options shall be extended.
*/ */
window[PLUGINNAME].defaultOptions = function(newDefaultOptions) { window[PLUGINNAME].defaultOptions = function(newDefaultOptions) {
initOverlayScrollbarsStatics();
var currDefaultOptions = _pluginGlobals.defaultOptions; var currDefaultOptions = _pluginGlobals.defaultOptions;
if(newDefaultOptions === undefined) if(newDefaultOptions === undefined)
return helper.extend(true, { }, currDefaultOptions); return helper.extend(true, { }, currDefaultOptions);
+4 -4
View File
File diff suppressed because one or more lines are too long
+10 -6
View File
@@ -2,22 +2,22 @@
* OverlayScrollbars * OverlayScrollbars
* https://github.com/KingSora/OverlayScrollbars * https://github.com/KingSora/OverlayScrollbars
* *
* Version: 1.2.0 * Version: 1.2.1
* *
* Copyright KingSora. * Copyright KingSora.
* https://github.com/KingSora * https://github.com/KingSora
* *
* Released under the MIT license. * Released under the MIT license.
* Date: 29.12.2017 * Date: 10.01.2018
*/ */
(function (global, factory) { (function (global, factory) {
if (typeof define === 'function' && define.amd) if (typeof define === 'function' && define.amd)
return define(['jquery'], function(jQuery) { return factory(window, document, undefined, jQuery); }); define(['jquery'], function(jQuery) { return factory(global, global.document, undefined, jQuery); });
else if (typeof exports === 'object') else if (typeof exports === 'object')
return module.exports = factory(window, document, undefined, require('jquery')); module.exports = factory(global, global.document, undefined, require('jquery'));
else else
return factory(window, document, undefined, jQuery); factory(global, global.document, undefined, jQuery);
}(this, (function(window, document, undefined, jQuery) { }(this, (function(window, document, undefined, jQuery) {
'use-strict'; 'use-strict';
var PLUGINNAME = "OverlayScrollbars"; var PLUGINNAME = "OverlayScrollbars";
@@ -1413,6 +1413,7 @@
attributeOldValue: true, attributeOldValue: true,
subtree: !_isTextarea, subtree: !_isTextarea,
childList: !_isTextarea, childList: !_isTextarea,
characterData: !_isTextarea,
attributeFilter: _isTextarea ? ['wrap', 'cols', 'rows'] : ['id', 'class', 'style'] attributeFilter: _isTextarea ? ['wrap', 'cols', 'rows'] : ['id', 'class', 'style']
}); });
@@ -3209,7 +3210,9 @@
if (heightAuto) { if (heightAuto) {
if (!cssMaxValue.ch) if (!cssMaxValue.ch)
contentElementCSS[_strMaxMinus + _strHeight] = _strEmpty; contentElementCSS[_strMaxMinus + _strHeight] = _strEmpty;
contentGlueElementCSS[_strHeight] = _isTextarea && textareaDynHeight ? textareaSize.dh : _strAuto; //fix dyn height collapse bug: (doesn't works for width!)
//contentGlueElementCSS[_strHeight] = _isTextarea && textareaDynHeight ? textareaSize.dh : _strAuto;
contentGlueElementCSS[_strHeight] = _isTextarea ? textareaDynHeight ? textareaSize.dh : _strAuto : _contentElement[0].clientHeight;
} }
if (sizeAutoCapable) if (sizeAutoCapable)
_contentGlueElement.css(contentGlueElementCSS); _contentGlueElement.css(contentGlueElementCSS);
@@ -4778,6 +4781,7 @@
* @param newDefaultOptions The object with which the default options shall be extended. * @param newDefaultOptions The object with which the default options shall be extended.
*/ */
window[PLUGINNAME].defaultOptions = function(newDefaultOptions) { window[PLUGINNAME].defaultOptions = function(newDefaultOptions) {
initOverlayScrollbarsStatics();
var currDefaultOptions = _pluginGlobals.defaultOptions; var currDefaultOptions = _pluginGlobals.defaultOptions;
if(newDefaultOptions === undefined) if(newDefaultOptions === undefined)
return helper.extend(true, { }, currDefaultOptions); return helper.extend(true, { }, currDefaultOptions);
+4 -4
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "overlayscrollbars", "name": "overlayscrollbars",
"version": "1.2.0", "version": "1.2.1",
"description": "A javascript scrollbar plugin which hides the native scrollbars and provides custom styleable overlay scrollbars, but keeps the native functionality and feeling.", "description": "A javascript scrollbar plugin which hides the native scrollbars and provides custom styleable overlay scrollbars, but keeps the native functionality and feeling.",
"keywords" : [ "keywords" : [
"overlayscrollbars", "overlayscrollbars",