Fix the bug that scrollbar rails show when they shouldn't.

Now, the scrollbar rails show even if the content is smaller than the
container. This patch fixes it.
This commit is contained in:
Hyunje Alex Jun 2014-01-22 11:14:01 +09:00
parent c1c41e6d14
commit f1491e777d

View File

@ -139,8 +139,8 @@
}; };
var updateScrollbarCss = function () { var updateScrollbarCss = function () {
$scrollbarXRail.css({left: $this.scrollLeft(), bottom: scrollbarXBottom - $this.scrollTop(), width: containerWidth, display: settings.suppressScrollX ? "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: settings.suppressScrollY ? "none": "inherit"}); $scrollbarYRail.css({top: $this.scrollTop(), right: scrollbarYRight - $this.scrollLeft(), height: containerHeight, display: scrollbarYActive ? "inherit": "none"});
$scrollbarX.css({left: scrollbarXLeft, width: scrollbarXWidth}); $scrollbarX.css({left: scrollbarXLeft, width: scrollbarXWidth});
$scrollbarY.css({top: scrollbarYTop, height: scrollbarYHeight}); $scrollbarY.css({top: scrollbarYTop, height: scrollbarYHeight});
}; };