diff --git a/src/perfect-scrollbar.js b/src/perfect-scrollbar.js index 915bcf4..1b284cb 100644 --- a/src/perfect-scrollbar.js +++ b/src/perfect-scrollbar.js @@ -139,8 +139,8 @@ }; var updateScrollbarCss = function () { - $scrollbarXRail.css({left: $this.scrollLeft(), bottom: scrollbarXBottom - $this.scrollTop(), width: containerWidth, display: settings.suppressScrollX ? "none": "inherit"}); - $scrollbarYRail.css({top: $this.scrollTop(), right: scrollbarYRight - $this.scrollLeft(), height: containerHeight, display: settings.suppressScrollY ? "none": "inherit"}); + $scrollbarXRail.css({left: $this.scrollLeft(), bottom: scrollbarXBottom - $this.scrollTop(), width: containerWidth, display: scrollbarXActive ? "inherit": "none"}); + $scrollbarYRail.css({top: $this.scrollTop(), right: scrollbarYRight - $this.scrollLeft(), height: containerHeight, display: scrollbarYActive ? "inherit": "none"}); $scrollbarX.css({left: scrollbarXLeft, width: scrollbarXWidth}); $scrollbarY.css({top: scrollbarYTop, height: scrollbarYHeight}); };