Change how scrollbar rails are being hidden.

Inline CSS change is bad practice.
This commit is contained in:
Hyunje Alex Jun
2014-10-28 18:01:23 +00:00
parent d0b97e4039
commit f099448e44
2 changed files with 12 additions and 15 deletions
+2 -15
View File
@@ -198,8 +198,8 @@
function updateGeometry() {
// Hide scrollbars not to affect scrollWidth and scrollHeight
$scrollbarXRail.hide();
$scrollbarYRail.hide();
$this.removeClass('ps-active-x');
$this.removeClass('ps-active-y');
containerWidth = settings.includePadding ? $this.innerWidth() : $this.width();
containerHeight = settings.includePadding ? $this.innerHeight() : $this.height();
@@ -239,22 +239,9 @@
if (scrollbarXActive) {
$this.addClass('ps-active-x');
} else {
$this.removeClass('ps-active-x');
}
if (scrollbarYActive) {
$this.addClass('ps-active-y');
} else {
$this.removeClass('ps-active-y');
}
// Show scrollbars if needed after updated
if (!settings.suppressScrollX) {
$scrollbarXRail.show();
}
if (!settings.suppressScrollY) {
$scrollbarYRail.show();
}
}