From ace6299d8a0056f6df0d03107d8aa289e8475085 Mon Sep 17 00:00:00 2001 From: Radagaisus Date: Thu, 6 Sep 2012 23:23:49 +0300 Subject: [PATCH] fix #30 - mousewhell rounding error --- antiscroll.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/antiscroll.js b/antiscroll.js index 06ff4db..d91122a 100644 --- a/antiscroll.js +++ b/antiscroll.js @@ -322,7 +322,7 @@ Scrollbar.Horizontal.prototype.mousewheel = function (ev, delta, x, y) { if ((x < 0 && 0 == this.pane.inner.get(0).scrollLeft) || - (x > 0 && (this.innerEl.scrollLeft + this.pane.el.width() + (x > 0 && (this.innerEl.scrollLeft + Math.ceil(this.pane.el.width()) == this.innerEl.scrollWidth))) { ev.preventDefault(); return false; @@ -390,7 +390,7 @@ Scrollbar.Vertical.prototype.mousewheel = function (ev, delta, x, y) { if ((y > 0 && 0 == this.innerEl.scrollTop) || - (y < 0 && (this.innerEl.scrollTop + this.pane.el.height() + (y < 0 && (this.innerEl.scrollTop + Math.ceil(this.pane.el.height()) == this.innerEl.scrollHeight))) { ev.preventDefault(); return false;