Remove includePadding
option.
It's supported by default.
This commit is contained in:
parent
3f002c49a1
commit
ff5ca3d804
@ -125,10 +125,6 @@ The number of pixels the content width can surpass the container width without e
|
|||||||
The number of pixels the content height can surpass the container height without enabling the Y axis scroll bar. Allows some "wiggle room" or "offset break", so that Y axis scroll bar is not enabled just because of a few pixels.
|
The number of pixels the content height can surpass the container height without enabling the Y axis scroll bar. Allows some "wiggle room" or "offset break", so that Y axis scroll bar is not enabled just because of a few pixels.
|
||||||
**Default: 0**
|
**Default: 0**
|
||||||
|
|
||||||
### includePadding
|
|
||||||
When set to true, it uses `innerWidth` and `innerHeight` for the container size instead of `width` and `height`. When your container element has non-zero padding and the scrollbar layout looks weird, this option can be helpful.
|
|
||||||
**Default: false**
|
|
||||||
|
|
||||||
How to Use
|
How to Use
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
@ -15,5 +15,4 @@ module.exports = {
|
|||||||
suppressScrollY: false,
|
suppressScrollY: false,
|
||||||
scrollXMarginOffset: 0,
|
scrollXMarginOffset: 0,
|
||||||
scrollYMarginOffset: 0,
|
scrollYMarginOffset: 0,
|
||||||
includePadding: false
|
|
||||||
};
|
};
|
||||||
|
@ -159,8 +159,8 @@ module.exports = function (element, settingOrCommand) {
|
|||||||
cls.remove(element, 'ps-active-x');
|
cls.remove(element, 'ps-active-x');
|
||||||
cls.remove(element, 'ps-active-y');
|
cls.remove(element, 'ps-active-y');
|
||||||
|
|
||||||
containerWidth = settings.includePadding ? element.clientWidth : h.toInt(d.css(element, 'width'));
|
containerWidth = element.clientWidth;
|
||||||
containerHeight = settings.includePadding ? element.clientHeight : h.toInt(d.css(element, 'height'));
|
containerHeight = element.clientHeight;
|
||||||
contentWidth = element.scrollWidth;
|
contentWidth = element.scrollWidth;
|
||||||
contentHeight = element.scrollHeight;
|
contentHeight = element.scrollHeight;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user