Skip to content

Commit

Permalink
0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Mar 24, 2022
1 parent e4e6434 commit cfdf5e5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ <h2 class='subtitle'>Source</h2>
</pre>
<h2 class='subtitle'>Download</h2>
<p>
<a href='https://github.com/noraesae/perfect-scrollbar/releases' class='btn btn-primary btn-large'>perfect-scrollbar v0.6.16</a>
<a href='https://github.com/noraesae/perfect-scrollbar/releases' class='btn btn-primary btn-large'>perfect-scrollbar v0.7.0</a>
</p>
<h2 class='subtitle'>Documentation</h2>
<p class='lead'>
Expand Down
4 changes: 2 additions & 2 deletions docs/perfect-scrollbar.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/perfect-scrollbar.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "perfect-scrollbar",
"version": "0.7.0",
"version": "0.7.1",
"description": "Minimalistic but perfect custom scrollbar plugin",
"author": "Hyunje Jun <me@noraesae.net>",
"contributors": [
Expand Down
38 changes: 17 additions & 21 deletions src/js/lib/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,24 @@ exports.outerWidth = function (element) {
toInt(dom.css(element, 'borderRightWidth'));
};

exports.startScrolling = function (element, axis) {
cls.add(element, 'ps-in-scrolling');
if (typeof axis !== 'undefined') {
cls.add(element, 'ps-' + axis);
} else {
cls.add(element, 'ps-x');
cls.add(element, 'ps-y');
}
};
function toggleScrolling(handler) {
return function (element, axis) {
handler(element, 'ps--in-scrolling');
if (typeof axis !== 'undefined') {
handler(element, 'ps--' + axis);
} else {
handler(element, 'ps--x');
handler(element, 'ps--y');
}
};
}

exports.stopScrolling = function (element, axis) {
cls.remove(element, 'ps-in-scrolling');
if (typeof axis !== 'undefined') {
cls.remove(element, 'ps-' + axis);
} else {
cls.remove(element, 'ps-x');
cls.remove(element, 'ps-y');
}
};
exports.startScrolling = toggleScrolling(cls.add);

exports.stopScrolling = toggleScrolling(cls.remove);

exports.env = {
isWebKit: 'WebkitAppearance' in document.documentElement.style,
supportsTouch: (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch),
supportsIePointer: window.navigator.msMaxTouchPoints !== null
isWebKit: typeof document !== 'undefined' && 'WebkitAppearance' in document.documentElement.style,
supportsTouch: typeof window !== 'undefined' && (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch),
supportsIePointer: typeof window !== 'undefined' && window.navigator.msMaxTouchPoints !== null
};

0 comments on commit cfdf5e5

Please sign in to comment.