Skip to content

Commit

Permalink
Merge pull request #51 from kapouer/patch-1
Browse files Browse the repository at this point in the history
Calculate needXScroll with scrollbarSize
  • Loading branch information
rauchg committed Mar 14, 2013
2 parents 5e5639f + a9cde9a commit 4d31236
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions antiscroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
*/

Antiscroll.prototype.refresh = function() {
var needHScroll = this.inner.get(0).scrollWidth > this.el.width(),
needVScroll = this.inner.get(0).scrollHeight > this.el.height();
var needHScroll = this.inner.get(0).scrollWidth > this.el.width() + (this.y ? scrollbarSize() : 0),
needVScroll = this.inner.get(0).scrollHeight > this.el.height() + (this.x ? scrollbarSize() : 0);

if (this.x) {
if (!this.horizontal && needHScroll) {
Expand Down

0 comments on commit 4d31236

Please sign in to comment.