From c1b40168f67557beeed44983ed307f77e2a65098 Mon Sep 17 00:00:00 2001 From: Hyunje Alex Jun Date: Sun, 28 Sep 2014 01:24:09 +0100 Subject: [PATCH] Hide scrollbar rails when they're suppressed. They were displayed even though suppresed. In this patch, the scrollbar rails won't be displayed unless they're needed. --- src/perfect-scrollbar.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/perfect-scrollbar.js b/src/perfect-scrollbar.js index f95813d..7a72051 100644 --- a/src/perfect-scrollbar.js +++ b/src/perfect-scrollbar.js @@ -243,9 +243,13 @@ updateScrollbarCss(); - // Show scrollbars again after updated - $scrollbarXRail.show(); - $scrollbarYRail.show(); + // Show scrollbars if needed after updated + if (!settings.suppressScrollX) { + $scrollbarXRail.show(); + } + if (!settings.suppressScrollY) { + $scrollbarYRail.show(); + } }; var bindMouseScrollXHandler = function () {