diff --git a/README.md b/README.md index 3db3883..3c9ba4b 100644 --- a/README.md +++ b/README.md @@ -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 ---------- diff --git a/src/js/plugin/default-setting.js b/src/js/plugin/default-setting.js index 06bdc1c..4e2b174 100644 --- a/src/js/plugin/default-setting.js +++ b/src/js/plugin/default-setting.js @@ -15,5 +15,4 @@ module.exports = { suppressScrollY: false, scrollXMarginOffset: 0, scrollYMarginOffset: 0, - includePadding: false }; diff --git a/src/js/plugin/ps.js b/src/js/plugin/ps.js index fede174..84e0081 100644 --- a/src/js/plugin/ps.js +++ b/src/js/plugin/ps.js @@ -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;