diff --git a/README.md b/README.md index b23fc88..b6e6fad 100644 --- a/README.md +++ b/README.md @@ -4,21 +4,21 @@

- Dependencies - Downloads - Version - License + Dependencies + Downloads + Version + License

- Website -   •   - Documentation -   •   - Demos -   •   - Extensions -   •   - FAQ + Website +   •   + Documentation +   •   + Demos +   •   + Extensions +   •   + FAQ

> OverlayScrollbars is a javascript scrollbar plugin which hides native scrollbars, provides @@ -45,16 +45,16 @@ I've created this plugin because I hate ugly and space consuming scrollbars. Sim ## Sponsors - - - - + + + +
- - - - - Thanks to BrowserStack for sponsoring open source projects and letting me test OverlayScrollbars for free. -
+ + + + + Thanks to BrowserStack for sponsoring open source projects and letting me test OverlayScrollbars for free. +
## Dependencies @@ -75,7 +75,7 @@ You can use OverlayScrollbars via a [cdn](https://cdnjs.com/libraries/overlayscr #### npm OverlayScrollbars can be downloaded from [npm](https://www.npmjs.com/package/overlayscrollbars). -``` +```sh npm install overlayscrollbars ``` @@ -105,7 +105,7 @@ If you are using the jQuery version, include [jQuery](https://jquery.com/) befor ``` -#### Javascript +#### JavaScript Initialize the plugin after your document has been fully loaded. @@ -121,11 +121,29 @@ document.addEventListener("DOMContentLoaded", function() { jQuery initialization: ```js $(function() { - //The passed argument has to be at least a empty object or a object with your desired options - $('body').overlayScrollbars({ }); + //The passed argument has to be at least a empty object or a object with your desired options + $('body').overlayScrollbars({ }); }); ``` +#### TypeScript + +OverlayScrollbars provides its own [TypeScript declarations](https://www.npmjs.com/package/@types/overlayscrollbars): +```sh +npm install @types/overlayscrollbars +``` + +I recommend setting these options in your **tsconfig.json**: +```json +{ + "compilerOptions": { + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + } +} +``` + + ## Options Due to clarity I can't provide all informations here. @@ -134,278 +152,278 @@ Take the table below only as a overview of all options. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
optiontypedefaultdescription
classNamestring / null"os-theme-dark"The class name which shall be added to the host element.
resizestring"none"The resize behavior of the host element. This option works exactly like the CSS3 resize property.
sizeAutoCapablebooleantrueIndicates whether the host element is capable of "auto" sizes such as: width: auto and height: auto.
clipAlwaysbooleantrueIndicates whether the content shall be clipped always.
normalizeRTLbooleantrueIndicates whether RTL scrolling shall be normalized.
paddingAbsolutebooleanfalseIndicates whether the padding for the content shall be absolute.
autoUpdateboolean / nullnullIndicates whether the plugin instance shall be updated continuously within a update loop.
autoUpdateIntervalnumber33The interval in milliseconds in which a auto update shall be performed for this instance.
nativeScrollbarsOverlaid : {
showNativeScrollbarsbooleanfalseIndicates whether the native overlaid scrollbars shall be visible.
initializebooleantrue - Indicates whether the plugin shall be initialized even if the native scrollbars are overlaid.
- If you initialize the plugin on the body element, I recommend to set this option to false. -
}
overflowBehavior : {
xstring"scroll"The overflow behavior for the x (horizontal) axis.
ystring"scroll"The overflow behavior for the y (vertical) axis.
}
scrollbars : {
visibilitystring"auto"The basic visibility of the scrollbars.
autoHidestring"never"The possibility to hide visible scrollbars automatically after a certain action.
autoHideDelaynumber800The delay in milliseconds before the scrollbars gets hidden automatically.
dragScrollingbooleantrueDefines whether the scrollbar-handle supports drag scrolling.
clickScrollingbooleanfalseDefines whether the scrollbar-track supports click scrolling.
touchSupportbooleantrueIndicates whether the scrollbar reacts to touch events.
snapHandlebooleanfalseIndicates whether the scrollbar handle-offset shall be snapped.
}
textarea : {
dynWidthbooleanfalseIndiactes whether the textarea width will be dynamic (content dependent).
dynHeightbooleanfalseIndiactes whether the textarea height will be dynamic (content dependent).
inheritedAttrsstring / array / null["style", "class"]During initialization: Attributes which the generated host-element shall inherit from from the target textarea-element.
+
optiontypedefaultdescription
classNamestring / null"os-theme-dark"The class name which shall be added to the host element.
resizestring"none"The resize behavior of the host element. This option works exactly like the CSS3 resize property.
sizeAutoCapablebooleantrueIndicates whether the host element is capable of "auto" sizes such as: width: auto and height: auto.
clipAlwaysbooleantrueIndicates whether the content shall be clipped always.
normalizeRTLbooleantrueIndicates whether RTL scrolling shall be normalized.
paddingAbsolutebooleanfalseIndicates whether the padding for the content shall be absolute.
autoUpdateboolean / nullnullIndicates whether the plugin instance shall be updated continuously within a update loop.
autoUpdateIntervalnumber33The interval in milliseconds in which a auto update shall be performed for this instance.
nativeScrollbarsOverlaid : {
showNativeScrollbarsbooleanfalseIndicates whether the native overlaid scrollbars shall be visible.
initializebooleantrue + Indicates whether the plugin shall be initialized even if the native scrollbars are overlaid.
+ If you initialize the plugin on the body element, I recommend to set this option to false. +
}
overflowBehavior : {
xstring"scroll"The overflow behavior for the x (horizontal) axis.
ystring"scroll"The overflow behavior for the y (vertical) axis.
}
scrollbars : {
visibilitystring"auto"The basic visibility of the scrollbars.
autoHidestring"never"The possibility to hide visible scrollbars automatically after a certain action.
autoHideDelaynumber800The delay in milliseconds before the scrollbars gets hidden automatically.
dragScrollingbooleantrueDefines whether the scrollbar-handle supports drag scrolling.
clickScrollingbooleanfalseDefines whether the scrollbar-track supports click scrolling.
touchSupportbooleantrueIndicates whether the scrollbar reacts to touch events.
snapHandlebooleanfalseIndicates whether the scrollbar handle-offset shall be snapped.
}
textarea : {
dynWidthbooleanfalseIndiactes whether the textarea width will be dynamic (content dependent).
dynHeightbooleanfalseIndiactes whether the textarea height will be dynamic (content dependent).
inheritedAttrsstring / array / null["style", "class"]During initialization: Attributes which the generated host-element shall inherit from from the target textarea-element.
During destruction: Attributes which the target textarea-element shall inherit from from the generated host-element.
}
callbacks : {
onInitializedfunction / nullnullGets fired after the plugin was initialized. It takes no arguments.
onInitializationWithdrawnfunction / nullnullGets fired after the initialization of the plugin was aborted due to the option nativeScrollbarsOverlaid : { initialize : false }. It takes no arguments.
onDestroyedfunction / nullnullGets fired after the plugin was destryoed. It takes no arguments.
onScrollStartfunction / nullnullGets fired after the user starts scrolling. It takes one argument.
onScrollfunction / nullnullGets fired after every scroll. It takes one argument.
onScrollStopfunction / nullnullGets fired after the user stops scrolling. It takes one argument.
onOverflowChangedfunction / nullnullGets fired after the overflow has changed. It takes one argument.
onOverflowAmountChangedfunction / nullnullGets fired after the overflow amount has changed. It takes one argument.
onDirectionChangedfunction / nullnullGets fired after the direction has changed. It takes one argument.
onContentSizeChangedfunction / nullnullGets fired after the content size has changed. It takes one argument.
onHostSizeChangedfunction / nullnullGets fired after the host size or host padding has changed. It takes one argument.
onUpdatedfunction / nullnullGets fired after the host size has changed. It takes one argument.
}
}
callbacks : {
onInitializedfunction / nullnullGets fired after the plugin was initialized. It takes no arguments.
onInitializationWithdrawnfunction / nullnullGets fired after the initialization of the plugin was aborted due to the option nativeScrollbarsOverlaid : { initialize : false }. It takes no arguments.
onDestroyedfunction / nullnullGets fired after the plugin was destryoed. It takes no arguments.
onScrollStartfunction / nullnullGets fired after the user starts scrolling. It takes one argument.
onScrollfunction / nullnullGets fired after every scroll. It takes one argument.
onScrollStopfunction / nullnullGets fired after the user stops scrolling. It takes one argument.
onOverflowChangedfunction / nullnullGets fired after the overflow has changed. It takes one argument.
onOverflowAmountChangedfunction / nullnullGets fired after the overflow amount has changed. It takes one argument.
onDirectionChangedfunction / nullnullGets fired after the direction has changed. It takes one argument.
onContentSizeChangedfunction / nullnullGets fired after the content size has changed. It takes one argument.
onHostSizeChangedfunction / nullnullGets fired after the host size or host padding has changed. It takes one argument.
onUpdatedfunction / nullnullGets fired after the host size has changed. It takes one argument.
}
## Methods @@ -415,60 +433,60 @@ Click on the method name to open a more detailed documentation. #### Instance methods: - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - + +
namedescription
.options()Returns or sets the options of the instance.
- example(s):
-
+    
namedescription
.options()Returns or sets the options of the instance.
+ example(s):
+
 //get options
 var options = instance.options();
 //set options
 instance.options({ className : null });
-
.update()Updates the instance.
- example(s):
-
+        
.update()Updates the instance.
+ example(s):
+
 //soft update
 instance.update();
 //hard update
 instance.update(true);
-
.sleep()Disables every observation of the DOM and puts the instance to "sleep". This behavior can be reset by calling the update() method.
- example(s):
-
+        
.sleep()Disables every observation of the DOM and puts the instance to "sleep". This behavior can be reset by calling the update() method.
+ example(s):
+
 //put the instance to sleep
 instance.sleep();
-
.scroll()Returns the scroll information or sets the scroll position.
- example(s):
-
+        
.scroll()Returns the scroll information or sets the scroll position.
+ example(s):
+
 //get scroll information
 var scrollInfo = instance.scroll();
 
@@ -484,147 +502,147 @@ instance.scroll({ x : "50%", y : "50%" }, 1000);
 
 //scroll to the passed element with a duration of 1000ms
 instance.scroll($(selector), 1000);
-
.scrollStop()Stops the current scroll-animation.
- example(s):
-
+        
.scrollStop()Stops the current scroll-animation.
+ example(s):
+
 //scroll-animation duration is 10 seconds
 instance.scroll({ y : "100%" }, 10000);
 //abort the 10 seconds scroll-animation immediately
 instance.scrollStop();
 //scroll-animation duration is 1 second
 instance.scroll({ y : "100%" }, 1000);
-
.getElements()Returns all relevant elements.
- example(s):
-
+        
.getElements()Returns all relevant elements.
+ example(s):
+
 //get the element to which the plugin was applied
 var pluginTarget = instance.getElements().target;
-
.getState()Returns a object which describes the current state of this instance.
- example(s):
-
+        
.getState()Returns a object which describes the current state of this instance.
+ example(s):
+
 //get the state of the plugin instance
 var pluginState = instance.getState();
-
.destroy()Destroys and disposes the current instance and removes all added elements form the DOM.
- example(s):
-
+        
.destroy()Destroys and disposes the current instance and removes all added elements form the DOM.
+ example(s):
+
 //destroy the instance
 instance.destroy();
-
.ext()Returns the instance of a certain extension of the current plugin instance.
- example(s):
-
+        
.ext()Returns the instance of a certain extension of the current plugin instance.
+ example(s):
+
 //get the instance of the extension "myExtension"
 var extensionInstance = instance.ext("myExtension");
-
.addExt()Adds a extension to the current instance.
- example(s):
-
+        
.addExt()Adds a extension to the current instance.
+ example(s):
+
 //add the registered extension "myExtension" to the plugin instance
 var extensionInstance = instance.addExt("myExtension");
-
.removeExt()Removes a extension from the current instance.
- example(s):
-
+        
.removeExt()Removes a extension from the current instance.
+ example(s):
+
 //add the registered extension "myExtension" to the plugin instance
 instance.addExt("myExtension");
 
 //remove the added extension "myExtension" from the plugin instance
 instance.removeExt("myExtension");
-
#### Global methods: - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - + + + + + + + + +
namedescription
OverlayScrollbars.defaultOptions()Returns or Sets the default options for each new plugin initialization.
- example(s):
-
+    
namedescription
OverlayScrollbars.defaultOptions()Returns or Sets the default options for each new plugin initialization.
+ example(s):
+
 //get the current defaultOptions
 var defaultOptions = OverlayScrollbars.defaultOptions();
 //set new default options
 OverlayScrollbars.defaultOptions({
-	className : "my-custom-class",
-	resize    : "both"
+    className : "my-custom-class",
+    resize    : "both"
 });
-
OverlayScrollbars.globals()Returns a plain object which contains global information about the plugin and each instance of it.
- example(s):
-
+        
OverlayScrollbars.globals()Returns a plain object which contains global information about the plugin and each instance of it.
+ example(s):
+
 //get the global information
 var globals = OverlayScrollbars.globals();
-
OverlayScrollbars.extension()Registers, Unregisters or returns extensions.
- example(s):
-
+        
OverlayScrollbars.extension()Registers, Unregisters or returns extensions.
+ example(s):
+
 //register a dummy extension with the name "myExtension"
 OverlayScrollbars.extension("myExtension", function() { return { }; });
 //unregister the extension with the name "myExtension"
@@ -633,8 +651,32 @@ OverlayScrollbars.extension("myExtension", null);
 var registeredExtension = OverlayScrollbars.extension("myExtension");
 //get all registered extension-objects
 var extensionObjects = OverlayScrollbars.extension();
-
OverlayScrollbars.valid()Checks whether the passed object is a non-destroyed OverlayScrollbars instance.
+ example(s):
+
+//create OverlayScrollbars instance
+var osInstance = OverlayScrollbars(document.body, { });
+
+//returns true
+OverlayScrollbars.valid(osInstance);
+
+//destroy the instance
+osInstance.destroy();
+
+//returns false
+OverlayScrollbars.valid(osInstance);
+
+//returns false
+OverlayScrollbars.valid({ });
+
## Future Plans diff --git a/css/OverlayScrollbars.css b/css/OverlayScrollbars.css index 158ca36..8fe3af7 100644 --- a/css/OverlayScrollbars.css +++ b/css/OverlayScrollbars.css @@ -2,13 +2,13 @@ * OverlayScrollbars * https://github.com/KingSora/OverlayScrollbars * - * Version: 1.8.0 + * Version: 1.9.0 * * Copyright KingSora | Rene Haas. * https://github.com/KingSora * * Released under the MIT license. - * Date: 08.07.2019 + * Date: 27.07.2019 */ /* diff --git a/css/OverlayScrollbars.min.css b/css/OverlayScrollbars.min.css index a07843e..8509e21 100644 --- a/css/OverlayScrollbars.min.css +++ b/css/OverlayScrollbars.min.css @@ -2,12 +2,12 @@ * OverlayScrollbars * https://github.com/KingSora/OverlayScrollbars * - * Version: 1.8.0 + * Version: 1.9.0 * * Copyright KingSora | Rene Haas. * https://github.com/KingSora * * Released under the MIT license. - * Date: 08.07.2019 + * Date: 27.07.2019 */ html.os-html,html.os-html>.os-host{display:block;overflow:hidden;box-sizing:border-box;height:100%!important;width:100%!important;min-width:100%!important;min-height:100%!important;margin:0!important;position:absolute!important}html.os-html>.os-host>.os-padding{position:absolute}body.os-dragging,body.os-dragging *{cursor:default}.os-host,.os-host-textarea{position:relative;overflow:visible!important;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;-ms-grid-row-align:flex-start;align-items:flex-start}.os-host-flexbox{overflow:hidden!important;display:-webkit-box;display:-ms-flexbox;display:flex}.os-host-flexbox>.os-size-auto-observer{height:inherit!important}.os-host-flexbox>.os-content-glue{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0}.os-host-flexbox>.os-size-auto-observer,.os-host-flexbox>.os-content-glue{min-height:0;min-width:0;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:1;flex-shrink:1;-ms-flex-preferred-size:auto;flex-basis:auto}#os-dummy-scrollbar-size{position:fixed;opacity:0;-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)';visibility:hidden;overflow:scroll;height:500px;width:500px}#os-dummy-scrollbar-size>div{width:200%;height:200%;margin:10px 0}#os-dummy-scrollbar-size,.os-viewport{-ms-overflow-style:scrollbar!important}.os-viewport-native-scrollbars-invisible#os-dummy-scrollbar-size,.os-viewport-native-scrollbars-invisible.os-viewport{scrollbar-width:none!important}.os-viewport-native-scrollbars-invisible#os-dummy-scrollbar-size::-webkit-scrollbar,.os-viewport-native-scrollbars-invisible.os-viewport::-webkit-scrollbar,.os-viewport-native-scrollbars-invisible#os-dummy-scrollbar-size::-webkit-scrollbar-corner,.os-viewport-native-scrollbars-invisible.os-viewport::-webkit-scrollbar-corner{display:none!important;width:0px!important;height:0px!important;visibility:hidden!important;background:transparent!important}.os-content-glue{box-sizing:inherit;max-height:100%;max-width:100%;width:100%;pointer-events:none}.os-padding{box-sizing:inherit;direction:inherit;position:absolute;overflow:visible;padding:0;margin:0;left:0;top:0;bottom:0;right:0;width:auto!important;height:auto!important;z-index:1}.os-host-overflow>.os-padding{overflow:hidden}.os-viewport{direction:inherit!important;box-sizing:inherit!important;resize:none!important;outline:none!important;position:absolute;overflow:hidden;top:0;left:0;bottom:0;right:0;padding:0;margin:0;-webkit-overflow-scrolling:touch}.os-content-arrange{position:absolute;z-index:-1;min-height:1px;min-width:1px;pointer-events:none}.os-content{direction:inherit;box-sizing:border-box!important;position:relative;display:block;height:100%;width:100%;height:100%;width:100%;visibility:visible}.os-content:before,.os-content:after{content:'';display:table;width:0;height:0;line-height:0;font-size:0}.os-content>.os-textarea{box-sizing:border-box!important;direction:inherit!important;background:transparent!important;outline:0 none transparent!important;overflow:hidden!important;position:absolute!important;display:block!important;top:0!important;left:0!important;margin:0!important;border-radius:0px!important;float:none!important;-webkit-filter:none!important;filter:none!important;border:none!important;resize:none!important;-webkit-transform:none!important;transform:none!important;max-width:none!important;max-height:none!important;box-shadow:none!important;-webkit-perspective:none!important;perspective:none!important;opacity:1!important;z-index:1!important;clip:auto!important;vertical-align:baseline!important;padding:0}.os-host-rtl>.os-padding>.os-viewport>.os-content>.os-textarea{right:0!important}.os-content>.os-textarea-cover{z-index:-1;pointer-events:none}.os-content>.os-textarea[wrap='off']{white-space:pre!important;margin:0px!important}.os-text-inherit{font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;font-variant:inherit;text-transform:inherit;text-decoration:inherit;text-indent:inherit;text-align:inherit;text-shadow:inherit;text-overflow:inherit;letter-spacing:inherit;word-spacing:inherit;line-height:inherit;unicode-bidi:inherit;direction:inherit;color:inherit;cursor:text}.os-resize-observer,.os-resize-observer-host{box-sizing:inherit;display:block;opacity:0;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}.os-resize-observer-host{padding:inherit;border:inherit;border-color:transparent;border-style:solid;box-sizing:border-box}.os-resize-observer-host:after{content:''}.os-resize-observer-host>.os-resize-observer,.os-resize-observer-host:after{height:200%;width:200%;padding:inherit;border:inherit;margin:0;display:block;box-sizing:content-box}.os-resize-observer.observed,object.os-resize-observer{box-sizing:border-box!important}.os-size-auto-observer{box-sizing:inherit!important;height:100%;width:inherit;max-width:1px;position:relative;float:left;max-height:1px;overflow:hidden;z-index:-1;padding:0;margin:0;pointer-events:none;-webkit-box-flex:inherit;-ms-flex-positive:inherit;flex-grow:inherit;-ms-flex-negative:0;flex-shrink:0;-ms-flex-preferred-size:0;flex-basis:0%}.os-size-auto-observer>.os-resize-observer{width:1000%;height:1000%;min-height:1px;min-width:1px}.os-resize-observer-item{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;z-index:-1;opacity:0;direction:ltr!important;-webkit-box-flex:0!important;-ms-flex:none!important;flex:none!important}.os-resize-observer-item-final{position:absolute;left:0;top:0;-webkit-transition:none!important;transition:none!important;-webkit-box-flex:0!important;-ms-flex:none!important;flex:none!important}.os-resize-observer{-webkit-animation-duration:0.001s;animation-duration:0.001s;-webkit-animation-name:hs-resize-observer-dummy-animation;animation-name:hs-resize-observer-dummy-animation}.os-host-transition>.os-scrollbar,.os-host-transition>.os-scrollbar-corner{-webkit-transition:opacity 0.3s,visibility 0.3s,top 0.3s,right 0.3s,bottom 0.3s,left 0.3s;transition:opacity 0.3s,visibility 0.3s,top 0.3s,right 0.3s,bottom 0.3s,left 0.3s}html.os-html>.os-host>.os-scrollbar{position:absolute;z-index:999999}.os-scrollbar,.os-scrollbar-corner{position:absolute;opacity:1;-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';z-index:1}.os-scrollbar-corner{bottom:0;right:0}.os-scrollbar{pointer-events:none}.os-scrollbar-track{pointer-events:auto;position:relative;height:100%;width:100%;padding:0!important;border:none!important}.os-scrollbar-handle{pointer-events:auto;position:absolute;width:100%;height:100%}.os-scrollbar-handle-off,.os-scrollbar-track-off{pointer-events:none}.os-scrollbar.os-scrollbar-unusable,.os-scrollbar.os-scrollbar-unusable *{pointer-events:none!important}.os-scrollbar.os-scrollbar-unusable .os-scrollbar-handle{opacity:0!important}.os-scrollbar-horizontal{bottom:0;left:0}.os-scrollbar-vertical{top:0;right:0}.os-host-rtl>.os-scrollbar-horizontal{right:0}.os-host-rtl>.os-scrollbar-vertical{right:auto;left:0}.os-host-rtl>.os-scrollbar-corner{right:auto;left:0}.os-scrollbar-auto-hidden,.os-padding + .os-scrollbar-corner,.os-host-resize-disabled.os-host-scrollbar-horizontal-hidden>.os-scrollbar-corner,.os-host-scrollbar-horizontal-hidden>.os-scrollbar-horizontal,.os-host-resize-disabled.os-host-scrollbar-vertical-hidden>.os-scrollbar-corner,.os-host-scrollbar-vertical-hidden>.os-scrollbar-vertical,.os-scrollbar-horizontal.os-scrollbar-auto-hidden + .os-scrollbar-vertical + .os-scrollbar-corner,.os-scrollbar-horizontal + .os-scrollbar-vertical.os-scrollbar-auto-hidden + .os-scrollbar-corner,.os-scrollbar-horizontal.os-scrollbar-auto-hidden + .os-scrollbar-vertical.os-scrollbar-auto-hidden + .os-scrollbar-corner{opacity:0;visibility:hidden;pointer-events:none}.os-scrollbar-corner-resize-both{cursor:nwse-resize}.os-host-rtl>.os-scrollbar-corner-resize-both{cursor:nesw-resize}.os-scrollbar-corner-resize-horizontal{cursor:ew-resize}.os-scrollbar-corner-resize-vertical{cursor:ns-resize}.os-dragging .os-scrollbar-corner.os-scrollbar-corner-resize{cursor:default}.os-host-resize-disabled.os-host-scrollbar-horizontal-hidden>.os-scrollbar-vertical{top:0;bottom:0}.os-host-resize-disabled.os-host-scrollbar-vertical-hidden>.os-scrollbar-horizontal,.os-host-rtl.os-host-resize-disabled.os-host-scrollbar-vertical-hidden>.os-scrollbar-horizontal{right:0;left:0}.os-scrollbar:hover,.os-scrollbar-corner.os-scrollbar-corner-resize{opacity:1!important;visibility:visible!important}.os-scrollbar-corner.os-scrollbar-corner-resize{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj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ywwLjIwOTEwMjQgMC4yMTgzNTk0LDAuNDY1NjIwNiAwLjIxODM1OTQsMC43MzY5NjI5IDAsMC43MjM1NzkzIC0wLjU4NjU3NywxLjMxMDE1NjMgLTEuMzEwMTU2MywxLjMxMDE1NjMgLTAuMjcxMzQyMiwwIC0wLjUyNzg2MDUsLTAuMDc3MDkzIC0wLjczNjk2MjksLTAuMjE4MzU5NCAwLjIzOTQxMDQsMC4zMTMwODU5IDAuNjEyNjM2MywwLjUxODYwMzUgMS4wMzcyMDcxLDAuNTE4NjAzNSAwLjcyMzU3OTMsMCAxLjMxMDE1NjIsLTAuNTg2NTc3IDEuMzEwMTU2MiwtMS4zMTAxNTYzIDAsLTAuNDI0NTcwOCAtMC4yMDU1MTc1LC0wLjc5Nzc5NjYgLTAuNTE4NjAzNSwtMS4wMzcyMDcgeiBtIDMuMDg0MzI2MiwwIGMgMC4xNDEyNjY3LDAuMjA5MTAyNCAwLjIxODM1OTQsMC40NjU2MjA2IDAuMjE4MzU5NCwwLjczNjk2MjkgMCwwLjcyMzU3OTMgLTAuNTg2NTc3LDEuMzEwMTU2MyAtMS4zMTAxNTYzLDEuMzEwMTU2MyAtMC4yNzEzNDIzLDAgLTAuNTI3ODYwNSwtMC4wNzcwOTMgLTAuNzM2OTYyOSwtMC4yMTgzNTk0IDAuMjM5NDEwNCwwLjMxMzA4NTkgMC42MTI2MzYyLDAuNTE4NjAzNSAxLjAzNzIwNywwLjUxODYwMzUgMC43MjM1NzkzLDAgMS4zMTAxNTYzLC0wLjU4NjU3NyAxLjMxMDE1NjMsLTEuMzEwMTU2MyAwLC0wLjQyNDU3MDggLTAuMjA1NTE3NiwtMC43OTc3OTY2IC0wLjUxODYwMzUsLTEuMDM3MjA3IHoiIC8+ICA8L2c+PC9zdmc+);background-repeat:no-repeat;background-position:100% 100%;pointer-events:auto!important}.os-host-rtl>.os-scrollbar-corner.os-scrollbar-corner-resize{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.os-host-overflow{overflow:hidden!important}@-webkit-keyframes hs-resize-observer-dummy-animation{from{z-index:0}to{z-index:-1}}@keyframes hs-resize-observer-dummy-animation{from{z-index:0}to{z-index:-1}}.os-theme-none>.os-scrollbar-horizontal,.os-theme-none>.os-scrollbar-vertical,.os-theme-none>.os-scrollbar-corner{display:none!important}.os-theme-none>.os-scrollbar-corner-resize{display:block!important;min-width:10px;min-height:10px}.os-theme-dark>.os-scrollbar-horizontal,.os-theme-light>.os-scrollbar-horizontal{right:10px;height:10px}.os-theme-dark>.os-scrollbar-vertical,.os-theme-light>.os-scrollbar-vertical{bottom:10px;width:10px}.os-theme-dark.os-host-rtl>.os-scrollbar-horizontal,.os-theme-light.os-host-rtl>.os-scrollbar-horizontal{left:10px;right:0}.os-theme-dark>.os-scrollbar-corner,.os-theme-light>.os-scrollbar-corner{height:10px;width:10px}.os-theme-dark>.os-scrollbar-corner,.os-theme-light>.os-scrollbar-corner{background-color:transparent}.os-theme-dark>.os-scrollbar,.os-theme-light>.os-scrollbar{padding:2px;box-sizing:border-box;background:transparent}.os-theme-dark>.os-scrollbar.os-scrollbar-unusable,.os-theme-light>.os-scrollbar.os-scrollbar-unusable{background:transparent}.os-theme-dark>.os-scrollbar>.os-scrollbar-track,.os-theme-light>.os-scrollbar>.os-scrollbar-track{background:transparent}.os-theme-dark>.os-scrollbar-horizontal>.os-scrollbar-track>.os-scrollbar-handle,.os-theme-light>.os-scrollbar-horizontal>.os-scrollbar-track>.os-scrollbar-handle{min-width:30px}.os-theme-dark>.os-scrollbar-vertical>.os-scrollbar-track>.os-scrollbar-handle,.os-theme-light>.os-scrollbar-vertical>.os-scrollbar-track>.os-scrollbar-handle{min-height:30px}.os-theme-dark.os-host-transition>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle,.os-theme-light.os-host-transition>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle{-webkit-transition:background-color 0.3s;transition:background-color 0.3s}.os-theme-dark>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle,.os-theme-light>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle,.os-theme-dark>.os-scrollbar>.os-scrollbar-track,.os-theme-light>.os-scrollbar>.os-scrollbar-track{border-radius:10px}.os-theme-dark>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle{background:rgba(0,0,0,.4)}.os-theme-light>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle{background:rgba(255,255,255,.4)}.os-theme-dark>.os-scrollbar:hover>.os-scrollbar-track>.os-scrollbar-handle{background:rgba(0,0,0,.55)}.os-theme-light>.os-scrollbar:hover>.os-scrollbar-track>.os-scrollbar-handle{background:rgba(255,255,255,.55)}.os-theme-dark>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle.active{background:rgba(0,0,0,.7)}.os-theme-light>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle.active{background:rgba(255,255,255,.7)}.os-theme-dark>.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-dark>.os-scrollbar-vertical .os-scrollbar-handle:before,.os-theme-light>.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-light>.os-scrollbar-vertical .os-scrollbar-handle:before{content:'';position:absolute;left:0;right:0;top:0;bottom:0;display:block}.os-theme-dark.os-host-scrollbar-horizontal-hidden>.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-dark.os-host-scrollbar-vertical-hidden>.os-scrollbar-vertical .os-scrollbar-handle:before,.os-theme-light.os-host-scrollbar-horizontal-hidden>.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-light.os-host-scrollbar-vertical-hidden>.os-scrollbar-vertical .os-scrollbar-handle:before{display:none}.os-theme-dark>.os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-light>.os-scrollbar-horizontal .os-scrollbar-handle:before{top:-6px;bottom:-2px}.os-theme-dark>.os-scrollbar-vertical .os-scrollbar-handle:before,.os-theme-light>.os-scrollbar-vertical .os-scrollbar-handle:before{left:-6px;right:-2px}.os-host-rtl.os-theme-dark>.os-scrollbar-vertical .os-scrollbar-handle:before,.os-host-rtl.os-theme-light>.os-scrollbar-vertical .os-scrollbar-handle:before{right:-6px;left:-2px} \ No newline at end of file diff --git a/js/OverlayScrollbars.js b/js/OverlayScrollbars.js index 36dee34..119a7b8 100644 --- a/js/OverlayScrollbars.js +++ b/js/OverlayScrollbars.js @@ -2,13 +2,13 @@ * OverlayScrollbars * https://github.com/KingSora/OverlayScrollbars * - * Version: 1.8.0 + * Version: 1.9.0 * * Copyright KingSora | Rene Haas. * https://github.com/KingSora * * Released under the MIT license. - * Date: 08.07.2019 + * Date: 27.07.2019 */ (function (global, factory) { @@ -1440,6 +1440,7 @@ } })(); var PLUGIN = (function() { + var _plugin; var _pluginsGlobals; var _pluginsAutoUpdateLoop; var _pluginsExtensions = [ ]; @@ -2005,7 +2006,7 @@ var each = FRAMEWORK.each; //make correct instanceof - var _base = new window[PLUGINNAME](); + var _base = new _plugin(); var _frameworkProto = FRAMEWORK[LEXICON.p]; //if passed element is no HTML element: skip and return @@ -2218,8 +2219,6 @@ var _ignoreOverlayScrollbarHidingCache; var _autoUpdateCache; var _sizeAutoCapableCache; - var _textareaAutoWrappingCache; - var _textareaInfoCache; var _contentElementScrollSizeChangeDetectedCache; var _hostElementSizeChangeDetectedCache; var _scrollbarsVisibilityCache; @@ -2230,6 +2229,9 @@ var _normalizeRTLCache; var _classNameCache; var _oldClassName; + var _textareaAutoWrappingCache; + var _textareaInfoCache; + var _textareaSizeCache; var _textareaDynHeightCache; var _textareaDynWidthCache; var _bodyMinSizeCache; @@ -3519,17 +3521,21 @@ //update Textarea var textareaSize = _isTextarea ? textareaUpdate() : false; + var textareaSizeChanged = _isTextarea && checkCacheAutoForce(textareaSize, _textareaSizeCache); var textareaDynOrigSize = _isTextarea && textareaSize ? { w : textareaDynWidth ? textareaSize._dynamicWidth : textareaSize._originalWidth, h : textareaDynHeight ? textareaSize._dynamicHeight : textareaSize._originalHeight } : { }; - + _textareaSizeCache = textareaSize; + //fix height auto / width auto in cooperation with current padding & boxSizing behavior: if (heightAuto && (heightAutoChanged || paddingAbsoluteChanged || boxSizingChanged || cssMaxValue.c || padding.c || border.c)) { - //if (cssMaxValue.ch) - contentElementCSS[_strMaxMinus + _strHeight] = - (cssMaxValue.ch ? (cssMaxValue.ih - paddingAbsoluteY + (_isBorderBox ? -_borderY : _paddingY)) - : _strEmpty); + /* + if (cssMaxValue.ch) + contentElementCSS[_strMaxMinus + _strHeight] = + (cssMaxValue.ch ? (cssMaxValue.ih - paddingAbsoluteY + (_isBorderBox ? -_borderY : _paddingY)) + : _strEmpty); + */ contentElementCSS[_strHeight] = _strAuto; } else if (heightAutoChanged || paddingAbsoluteChanged) { @@ -3537,11 +3543,13 @@ contentElementCSS[_strHeight] = _strHundredPercent; } if (widthAuto && (widthAutoChanged || paddingAbsoluteChanged || boxSizingChanged || cssMaxValue.c || padding.c || border.c || cssDirectionChanged)) { - //if (cssMaxValue.cw) - contentElementCSS[_strMaxMinus + _strWidth] = - (cssMaxValue.cw ? (cssMaxValue.iw - paddingAbsoluteX + (_isBorderBox ? -_borderX : _paddingX)) + - (_nativeScrollbarIsOverlaid.y /*&& _hasOverflowCache.y && widthAuto */ ? _overlayScrollbarDummySize.y : 0) - : _strEmpty); + /* + if (cssMaxValue.cw) + contentElementCSS[_strMaxMinus + _strWidth] = + (cssMaxValue.cw ? (cssMaxValue.iw - paddingAbsoluteX + (_isBorderBox ? -_borderX : _paddingX)) + + (_nativeScrollbarIsOverlaid.y ? _overlayScrollbarDummySize.y : 0) + : _strEmpty); + */ contentElementCSS[_strWidth] = _strAuto; contentGlueElementCSS[_strMaxMinus + _strWidth] = _strHundredPercent; //IE Fix } @@ -3581,7 +3589,7 @@ contentGlueElementCSS = {}; //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 || scrollbarsAutoHideChanged || scrollbarsDragScrollingChanged || scrollbarsClickScrollingChanged || textareaDynWidthChanged || textareaDynHeightChanged || textareaAutoWrappingChanged) { + if (hostSizeChanged || contentSizeChanged || textareaSizeChanged || cssDirectionChanged || boxSizingChanged || paddingAbsoluteChanged || widthAutoChanged || widthAuto || heightAutoChanged || heightAuto || cssMaxValue.c || ignoreOverlayScrollbarHidingChanged || overflowBehaviorChanged || clipAlwaysChanged || resizeChanged || scrollbarsVisibilityChanged || scrollbarsAutoHideChanged || scrollbarsDragScrollingChanged || scrollbarsClickScrollingChanged || textareaDynWidthChanged || textareaDynHeightChanged || textareaAutoWrappingChanged) { var strOverflow = 'overflow'; var strOverflowX = strOverflow + '-x'; var strOverflowY = strOverflow + '-y'; @@ -3597,8 +3605,8 @@ //Reset the viewport (very important for natively overlaid scrollbars and zoom change //don't change the overflow prop as it is very expensive and affects performance !A LOT! var viewportElementResetCSS = { }; - var resetXTmp = _hasOverflowCache.y && _hideOverflowCache.ys && !ignoreOverlayScrollbarHiding ? (_nativeScrollbarIsOverlaid.y ? _viewportElement.css(isRTLLeft) : -_nativeScrollbarSize.y) : 0; - var resetBottomTmp = _hasOverflowCache.x && _hideOverflowCache.xs && !ignoreOverlayScrollbarHiding ? (_nativeScrollbarIsOverlaid.x ? _viewportElement.css(_strBottom) : -_nativeScrollbarSize.x) : 0; + var resetXTmp = _hasOverflowCache.y && _hideOverflowCache.ys && !ignoreOverlayScrollbarHiding && !_nativeScrollbarStyling ? (_nativeScrollbarIsOverlaid.y ? _viewportElement.css(isRTLLeft) : -_nativeScrollbarSize.y) : 0; + var resetBottomTmp = _hasOverflowCache.x && _hideOverflowCache.xs && !ignoreOverlayScrollbarHiding && !_nativeScrollbarStyling ? (_nativeScrollbarIsOverlaid.x ? _viewportElement.css(_strBottom) : -_nativeScrollbarSize.x) : 0; setTopRightBottomLeft(viewportElementResetCSS, _strEmpty); _viewportElement.css(viewportElementResetCSS); if(hideOverflow4CorrectMeasuring) @@ -3671,7 +3679,7 @@ contentGlueElementCSS[strWH] = maxSize + (_isBorderBox ? 0 : paddingSize) + 1; //if size is auto and host is smaller than size as min size, make content glue size -1 to make sure size changes will be detected (this is only needed if padding is 0) - if (autoSize && (contentSize[wh] < _viewportSize[wh]) && (horizontal ? (_isTextarea ? !textareaAutoWrapping : false) : true)) { + if (autoSize && (contentSize[wh] < _viewportSize[wh]) && (horizontal && _isTextarea ? !textareaAutoWrapping : true)) { if (_isTextarea) textareaCoverCSS[strWH] = parseToZeroOrNumber(_textareaCoverElement.css(strWH)) - 1; contentGlueElementCSS[strWH] -= 1; @@ -4015,8 +4023,7 @@ else _scrollbarCornerElement[remove ? 'off' : 'on'](_strMouseTouchDownEvent, _resizeOnMouseTouchDown); }; - removeClass(_scrollbarCornerElement, [ - _classNameHostResizeDisabled, + removeClass(_scrollbarCornerElement, [ _classNameScrollbarCornerResize, _classNameScrollbarCornerResizeB, _classNameScrollbarCornerResizeH, @@ -4026,6 +4033,7 @@ setupCornerEvents(true); } else { + removeClass(_hostElement, _classNameHostResizeDisabled); addClass(_scrollbarCornerElement, _classNameScrollbarCornerResize); if (_resizeBoth) addClass(_scrollbarCornerElement, _classNameScrollbarCornerResizeB); @@ -6130,7 +6138,7 @@ * @returns {{}} The instance of the added extension or undefined if the extension couldn't be added properly. */ _base.addExt = function(extName, extensionOptions) { - var registeredExtensionObj = window[PLUGINNAME].extension(extName); + var registeredExtensionObj = _plugin.extension(extName); var instance; var instanceAdded; var instanceContract; @@ -6318,7 +6326,7 @@ * @param extensions The extension(s) which shall be added right after initialization. * @returns {*} */ - window[PLUGINNAME] = function(pluginTargetElements, options, extensions) { + _plugin = window[PLUGINNAME] = function(pluginTargetElements, options, extensions) { if(arguments[LEXICON.l] === 0) return this; @@ -6352,7 +6360,7 @@ else { FRAMEWORK.each(pluginTargetElements, function(i, v) { inst = INSTANCES(v); - if((options === '!' && inst instanceof window[PLUGINNAME]) || (COMPATIBILITY.type(options) == TYPES.f && options(v, inst))) + if((options === '!' && _plugin.valid(inst)) || (COMPATIBILITY.type(options) == TYPES.f && options(v, inst))) arr.push(inst); else if(options === undefined) arr.push(inst); @@ -6367,7 +6375,7 @@ * Returns a object which contains global information about the plugin and each instance of it. * The returned object is just a copy, that means that changes to the returned object won't have any effect to the original object. */ - window[PLUGINNAME].globals = function () { + _plugin.globals = function () { initOverlayScrollbarsStatics(); var globals = FRAMEWORK.extend(true, { }, _pluginsGlobals); delete globals['msie']; @@ -6378,7 +6386,7 @@ * Gets or Sets the default options for each new plugin initialization. * @param newDefaultOptions The object with which the default options shall be extended. */ - window[PLUGINNAME].defaultOptions = function(newDefaultOptions) { + _plugin.defaultOptions = function(newDefaultOptions) { initOverlayScrollbarsStatics(); var currDefaultOptions = _pluginsGlobals.defaultOptions; if(newDefaultOptions === undefined) @@ -6388,6 +6396,15 @@ _pluginsGlobals.defaultOptions = FRAMEWORK.extend(true, { }, currDefaultOptions , _pluginsOptions._validate(newDefaultOptions, _pluginsOptions._template, true, currDefaultOptions)._default); }; + /** + * Checks whether the passed instance is a non-destroyed OverlayScrollbars instance. + * @param osInstance The potential OverlayScrollbars instance which shall be checked. + * @returns {boolean} True if the passed value is a non-destroyed OverlayScrollbars instance, false otherwise. + */ + _plugin.valid = function (osInstance) { + return osInstance instanceof _plugin && !osInstance.getState().destroyed; + }; + /** * Registers, Unregisters or returns a extension. * Register: Pass the name and the extension. (defaultOptions is optional) @@ -6398,7 +6415,7 @@ * @param extension A function which generates the instance of the extension or anything other to remove a already registered extension. * @param defaultOptions The default options which shall be used for the registered extension. */ - window[PLUGINNAME].extension = function(extensionName, extension, defaultOptions) { + _plugin.extension = function(extensionName, extension, defaultOptions) { var extNameTypeString = COMPATIBILITY.type(extensionName) == TYPES.s; var argLen = arguments[LEXICON.l]; var i = 0; @@ -6428,7 +6445,7 @@ } }; - return window[PLUGINNAME]; + return _plugin; })(); if(JQUERY && JQUERY.fn) { diff --git a/js/OverlayScrollbars.min.js b/js/OverlayScrollbars.min.js index a2bbbd0..cb6f679 100644 --- a/js/OverlayScrollbars.min.js +++ b/js/OverlayScrollbars.min.js @@ -2,12 +2,12 @@ * OverlayScrollbars * https://github.com/KingSora/OverlayScrollbars * - * Version: 1.8.0 + * Version: 1.9.0 * * Copyright KingSora | Rene Haas. * https://github.com/KingSora * * Released under the MIT license. - * Date: 08.07.2019 + * Date: 27.07.2019 */ -!function(n,t){"function"==typeof define&&define.amd?define(function(){return t(n,n.document,undefined)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(n,n.document,undefined):t(n,n.document,undefined)}("undefined"!=typeof window?window:this,function(vt,ht,Oi){"use strict";var a,i,o,dt="OverlayScrollbars",pt="object",bt="function",mt="array",gt="string",wt="boolean",yt="number",p="undefined",h="null",xt="class",Si="style",_t="id",zi="length",Ot="prototype",Ci="offsetHeight",Ti="clientHeight",ki="scrollHeight",Ii="offsetWidth",Ai="clientWidth",Ei="scrollWidth",St="hasOwnProperty",zt={u:{},v:{},m:["-webkit-","-moz-","-o-","-ms-"],g:["WebKit","Moz","O","MS"],_:function(n){var t=this.v;if(t[n])return t[n];for(var r,e,i=this.m,o=this.O(n),u=ht.createElement("div")[Si],f=0,a=0;f
'),o=S[0],e=Ni(S.children("div").eq(0));O.append(S),S.hide().show();var t,r,u,f,a,c,s,l,v,h=z(o),d={x:0===h.x,y:0===h.y};function z(n){return{x:n[Ci]-n[Ti],y:n[Ii]-n[Ai]}}Ni.extend(_,{defaultOptions:n,autoUpdateLoop:!1,autoUpdateRecommended:!Hi.mO(),nativeScrollbarSize:h,nativeScrollbarIsOverlaid:d,nativeScrollbarStyling:function(){var n=!1;S.addClass("os-viewport-native-scrollbars-invisible");try{n="none"===S.css("scrollbar-width")||"none"===vt.getComputedStyle(o,"::-webkit-scrollbar").getPropertyValue("display")}catch(t){}return n}(),overlayScrollbarDummySize:{x:30,y:30},msie:(r=vt.navigator.userAgent,u="indexOf",f="substring",a=r[u]("MSIE "),c=r[u]("Trident/"),s=r[u]("Edge/"),l=r[u]("rv:"),v=parseInt,0i&&(t.update("auto"),d[a]=new Date(o+=i)),n=Li.max(1,Li.min(n,i)));b=n}}else b=33};this.add=function(n){-1===e(n,h)&&(h.push(n),d.push(s()),0/g,(l?"-":Ie)+He)[v](/px/g,Ie)[v](/%/g," * "+c*(s&&Nt.n?-1:1)/100)[v](/vw/g," * "+pe.w)[v](/vh/g," * "+pe.h),bi(isNaN(t)?bi(h(t),!0).toFixed():t)):t)!==Oi&&!isNaN(e)&&sn(e)==yt){var d=y&&s,p=a*(d&&Nt.n?-1:1),b=d&&Nt.i,m=d&&Nt.n;switch(p=b?c-p:p,r){case"+=":i=p+e;break;case"-=":i=p-e;break;case"*=":i=p*e;break;case"/=":i=p/e;break;default:i=e}i=b?c-i:i,i*=m?-1:1,i=s&&Nt.n?Li.min(0,Li.max(c,i)):Li.max(0,Li.min(c,i))}return i===a?Oi:i},U=function(n,t,r,e){var i,o,u=[r,r],f=sn(n);if(f==t)n=[n,n];else if(f==mt){if(2<(i=n[H])||i<1)n=u;else for(1===i&&(n[1]=r),l=0;l=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom||Xn(),(ue||fe)&&ci(!1)}}function N(n){i=cr[k](),i=isNaN(i)?0:i,(Zt&&_&&!Nt.n||!Zt)&&(i=i<0?0:i),z=it()[T],S=c(n),P=!s(u),xi(j,Mn),xi(r.dn,o),xi(r.bn,o),W.on(X,h).on(q,L).on(J,$n),!D&&g||Hi.prvD(n),Hi.stpP(n)}a(r.dn,De,function d(n){H(n)&&N(n)}),a(r.pn,[De,Y,$],[function R(n){if(H(n)){var h,d=Li.round(pe[r.Y]),p=r.pn.offset()[r.$],t=n.ctrlKey,b=n.shiftKey,m=b&&t,g=!0,w=function(n){P&&li(_,n)},y=function(){w(),N(n)},x=function(){if(!Bt){var n=(S-p)*z,t=C.P,r=C.V,e=C.B,i=C.F,o=C.W,u=270*I,f=g?Li.max(400,u):u,a=i*((n-e/2)/(r-e)),c=Zt&&_&&(!Nt.i&&!Nt.n||$r),s=c?t"+(n||Ie)+""}function ft(n,t){for(var r,e=t.split(B),i=0;i
'),o=S[0],e=Di(S.children("div").eq(0));O.append(S),S.hide().show();var t,r,u,f,a,c,s,l,v,h=z(o),d={x:0===h.x,y:0===h.y};function z(n){return{x:n[ki]-n[Ii],y:n[Ei]-n[Hi]}}Di.extend(_,{defaultOptions:n,autoUpdateLoop:!1,autoUpdateRecommended:!Ni.mO(),nativeScrollbarSize:h,nativeScrollbarIsOverlaid:d,nativeScrollbarStyling:function(){var n=!1;S.addClass("os-viewport-native-scrollbars-invisible");try{n="none"===S.css("scrollbar-width")||"none"===ht.getComputedStyle(o,"::-webkit-scrollbar").getPropertyValue("display")}catch(t){}return n}(),overlayScrollbarDummySize:{x:30,y:30},msie:(r=ht.navigator.userAgent,u="indexOf",f="substring",a=r[u]("MSIE "),c=r[u]("Trident/"),s=r[u]("Edge/"),l=r[u]("rv:"),v=parseInt,0i&&(t.update("auto"),d[a]=new Date(o+=i)),n=Ri.max(1,Ri.min(n,i)));b=n}}else b=33};this.add=function(n){-1===e(n,h)&&(h.push(n),d.push(s()),0/g,(l?"-":Ee)+Ne)[v](/px/g,Ee)[v](/%/g," * "+c*(s&&Rt.n?-1:1)/100)[v](/vw/g," * "+me.w)[v](/vh/g," * "+me.h),gi(isNaN(t)?gi(h(t),!0).toFixed():t)):t)!==zi&&!isNaN(e)&&sn(e)==yt){var d=y&&s,p=a*(d&&Rt.n?-1:1),b=d&&Rt.i,m=d&&Rt.n;switch(p=b?c-p:p,r){case"+=":i=p+e;break;case"-=":i=p-e;break;case"*=":i=p*e;break;case"/=":i=p/e;break;default:i=e}i=b?c-i:i,i*=m?-1:1,i=s&&Rt.n?Ri.min(0,Ri.max(c,i)):Ri.max(0,Ri.min(c,i))}return i===a?zi:i},U=function(n,t,r,e){var i,o,u=[r,r],f=sn(n);if(f==t)n=[n,n];else if(f==mt){if(2<(i=n[H])||i<1)n=u;else for(1===i&&(n[1]=r),l=0;l=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom||Xn(),(ae||ce)&&li(!1)}}function N(n){i=sr[k](),i=isNaN(i)?0:i,(nr&&_&&!Rt.n||!nr)&&(i=i<0?0:i),z=it()[T],S=c(n),P=!s(u),Oi(j,Mn),Oi(r.dn,o),Oi(r.bn,o),W.on(X,h).on(q,L).on(J,$n),!D&&g||Ni.prvD(n),Ni.stpP(n)}a(r.dn,We,function d(n){H(n)&&N(n)}),a(r.pn,[We,Y,$],[function R(n){if(H(n)){var h,d=Ri.round(me[r.Y]),p=r.pn.offset()[r.$],t=n.ctrlKey,b=n.shiftKey,m=b&&t,g=!0,w=function(n){P&&hi(_,n)},y=function(){w(),N(n)},x=function(){if(!Qt){var n=(S-p)*z,t=C.P,r=C.V,e=C.B,i=C.F,o=C.W,u=270*I,f=g?Ri.max(400,u):u,a=i*((n-e/2)/(r-e)),c=nr&&_&&(!Rt.i&&!Rt.n||Yr),s=c?t"+(n||Ee)+""}function ft(n,t){for(var r,e=t.split(B),i=0;i
'),o=z[0],e=Di(z.children("div").eq(0));S.append(z),z.hide().show();var t,r,a,u,f,c,l,s,v,d=T(o),h={x:0===d.x,y:0===d.y};function T(n){return{x:n[Oi]-n[ki],y:n[Ai]-n[Ni]}}Di.extend(_,{defaultOptions:n,autoUpdateLoop:!1,autoUpdateRecommended:!Li.mO(),nativeScrollbarSize:d,nativeScrollbarIsOverlaid:h,nativeScrollbarStyling:function(){var n=!1;z.addClass("os-viewport-native-scrollbars-invisible");try{n="none"===z.css("scrollbar-width")||"none"===vt.getComputedStyle(o,"::-webkit-scrollbar").getPropertyValue("display")}catch(t){}return n}(),overlayScrollbarDummySize:{x:30,y:30},msie:(r=vt.navigator.userAgent,a="indexOf",u="substring",f=r[a]("MSIE "),c=r[a]("Trident/"),l=r[a]("Edge/"),s=r[a]("rv:"),v=parseInt,0i&&(t.update("auto"),h[f]=new Date(o+=i)),n=Ri.max(1,Ri.min(n,i)));b=n}}else b=33};this.add=function(n){-1===e(n,d)&&(d.push(n),h.push(l()),0/g,(s?"-":Ae)+Le)[v](/px/g,Ae)[v](/%/g," * "+c*(l&&Dt.n?-1:1)/100)[v](/vw/g," * "+pe.w)[v](/vh/g," * "+pe.h),bi(isNaN(t)?bi(d(t),!0).toFixed():t)):t)!==Si&&!isNaN(e)&&ln(e)==wt){var h=w&&l,p=f*(h&&Dt.n?-1:1),b=h&&Dt.i,m=h&&Dt.n;switch(p=b?c-p:p,r){case"+=":i=p+e;break;case"-=":i=p-e;break;case"*=":i=p*e;break;case"/=":i=p/e;break;default:i=e}i=b?c-i:i,i*=m?-1:1,i=l&&Dt.n?Ri.min(0,Ri.max(c,i)):Ri.max(0,Ri.min(c,i))}return i===f?Si:i},V=function(n,t,r,e){var i,o,a=[r,r],u=ln(n);if(u==t)n=[n,n];else if(u==mt){if(2<(i=n[L])||i<1)n=a;else for(1===i&&(n[1]=r),s=0;s=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom||Yn(),(ae||ue)&&ci(!1)}}function D(n){i=cr[C](),i=isNaN(i)?0:i,(Zt&&_&&!Dt.n||!Zt)&&(i=i<0?0:i),T=it()[k],z=c(n),U=!l(a),xi(E,Wn),xi(r.ln,o),xi(r.vn,o),j.on(Y,d).on(X,R).on(Q,Kn),!M&&y||Li.prvD(n),Li.stpP(n)}f(r.ln,Me,function h(n){L(n)&&D(n)}),f(r.sn,[Me,$,K],[function I(n){if(L(n)){var d,h=Ri.round(pe[r.q]),p=r.sn.offset()[r.V],t=n.ctrlKey,b=n.shiftKey,m=b&&t,y=!0,g=function(n){U&&si(_,n)},w=function(){g(),D(n)},x=function(){if(!Pt){var n=(z-p)*T,t=O.W,r=O.U,e=O.j,i=O.M,o=O.D,a=270*A,u=y?Ri.max(400,a):a,f=i*((n-e/2)/(r-e)),c=Zt&&_&&(!Dt.i&&!Dt.n||Kr),l=c?t"+(n||Ae)+""}function ut(n,t){for(var r,e=t.split(P),i=0;i
'),o=z[0],e=Mi(z.children("div").eq(0));S.append(z),z.hide().show();var t,r,a,u,f,c,l,s,v,d=T(o),h={x:0===d.x,y:0===d.y};function T(n){return{x:n[Ci]-n[Ai],y:n[Hi]-n[Li]}}Mi.extend(_,{defaultOptions:n,autoUpdateLoop:!1,autoUpdateRecommended:!Di.mO(),nativeScrollbarSize:d,nativeScrollbarIsOverlaid:h,nativeScrollbarStyling:function(){var n=!1;z.addClass("os-viewport-native-scrollbars-invisible");try{n="none"===z.css("scrollbar-width")||"none"===dt.getComputedStyle(o,"::-webkit-scrollbar").getPropertyValue("display")}catch(t){}return n}(),overlayScrollbarDummySize:{x:30,y:30},msie:(r=dt.navigator.userAgent,a="indexOf",u="substring",f=r[a]("MSIE "),c=r[a]("Trident/"),l=r[a]("Edge/"),s=r[a]("rv:"),v=parseInt,0i&&(t.update("auto"),h[f]=new Date(o+=i)),n=Ii.max(1,Ii.min(n,i)));b=n}}else b=33};this.add=function(n){-1===e(n,d)&&(d.push(n),h.push(l()),0/g,(s?"-":He)+De)[v](/px/g,He)[v](/%/g," * "+c*(l&&It.n?-1:1)/100)[v](/vw/g," * "+me.w)[v](/vh/g," * "+me.h),yi(isNaN(t)?yi(d(t),!0).toFixed():t)):t)!==Ti&&!isNaN(e)&&ln(e)==wt){var h=w&&l,p=f*(h&&It.n?-1:1),b=h&&It.i,m=h&&It.n;switch(p=b?c-p:p,r){case"+=":i=p+e;break;case"-=":i=p-e;break;case"*=":i=p*e;break;case"/=":i=p/e;break;default:i=e}i=b?c-i:i,i*=m?-1:1,i=l&&It.n?Ii.min(0,Ii.max(c,i)):Ii.max(0,Ii.min(c,i))}return i===f?Ti:i},V=function(n,t,r,e){var i,o,a=[r,r],u=ln(n);if(u==t)n=[n,n];else if(u==mt){if(2<(i=n[L])||i<1)n=a;else for(1===i&&(n[1]=r),s=0;s=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom||Yn(),(fe||ce)&&si(!1)}}function D(n){i=lr[C](),i=isNaN(i)?0:i,(nr&&_&&!It.n||!nr)&&(i=i<0?0:i),T=it()[k],z=c(n),U=!l(a),Si(E,Wn),Si(r.ln,o),Si(r.vn,o),j.on(Y,d).on(X,R).on(Q,Kn),!M&&y||Di.prvD(n),Di.stpP(n)}f(r.ln,je,function h(n){L(n)&&D(n)}),f(r.sn,[je,$,K],[function I(n){if(L(n)){var d,h=Ii.round(me[r.q]),p=r.sn.offset()[r.V],t=n.ctrlKey,b=n.shiftKey,m=b&&t,y=!0,g=function(n){U&&di(_,n)},w=function(){g(),D(n)},x=function(){if(!qt){var n=(z-p)*T,t=O.W,r=O.U,e=O.j,i=O.M,o=O.D,a=270*A,u=y?Ii.max(400,a):a,f=i*((n-e/2)/(r-e)),c=nr&&_&&(!It.i&&!It.n||$r),l=c?t"+(n||He)+""}function ut(n,t){for(var r,e=t.split(P),i=0;i