Remove includePadding option.

It's supported by default.
This commit is contained in:
Hyunje Alex Jun 2015-01-24 14:39:13 +00:00
parent 3f002c49a1
commit ff5ca3d804
3 changed files with 2 additions and 7 deletions

View File

@ -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.
**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
----------

View File

@ -15,5 +15,4 @@ module.exports = {
suppressScrollY: false,
scrollXMarginOffset: 0,
scrollYMarginOffset: 0,
includePadding: false
};

View File

@ -159,8 +159,8 @@ module.exports = function (element, settingOrCommand) {
cls.remove(element, 'ps-active-x');
cls.remove(element, 'ps-active-y');
containerWidth = settings.includePadding ? element.clientWidth : h.toInt(d.css(element, 'width'));
containerHeight = settings.includePadding ? element.clientHeight : h.toInt(d.css(element, 'height'));
containerWidth = element.clientWidth;
containerHeight = element.clientHeight;
contentWidth = element.scrollWidth;
contentHeight = element.scrollHeight;