From fb2d82ca38a10e107c70ebbec35aaa60f18d4eb6 Mon Sep 17 00:00:00 2001 From: Jake Luer Date: Wed, 9 May 2012 11:33:16 -0400 Subject: [PATCH] autoHide option to prevent scrollbars from disappearing --- antiscroll.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/antiscroll.js b/antiscroll.js index dc70c58..06ff4db 100644 --- a/antiscroll.js +++ b/antiscroll.js @@ -51,6 +51,7 @@ * * @api public */ + Antiscroll.prototype.refresh = function() { var needHScroll = this.inner.get(0).scrollWidth > this.el.width() , needVScroll = this.inner.get(0).scrollHeight > this.el.height(); @@ -68,7 +69,6 @@ this.vertical.destroy(); this.vertical = null } - }; /** @@ -254,7 +254,8 @@ */ Scrollbar.prototype.hide = function () { - if (this.shown) { + var autoHide = this.pane.options.autoHide; + if (autoHide !== false && this.shown) { // check for dragging this.el.removeClass('antiscroll-scrollbar-shown'); this.shown = false;