From 439f2100b82809247176aa88b4f34f40ae1fc512 Mon Sep 17 00:00:00 2001 From: raRaRa Date: Sat, 24 May 2014 20:41:08 +0000 Subject: [PATCH] Fixing bug with mousewheel There are two issues with the mouse wheel, which made the iPod scroll fail on the latest version. 1. Mouse wheel does not respect stopper 2. Mouse wheel does not trigger the change hook I haven't read over the code to see if I placed my fix in the correct place or if there's some re-factoring I can do. Please review. Thanks! --- js/jquery.knob.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/jquery.knob.js b/js/jquery.knob.js index 4c927f7..7b28ae9 100755 --- a/js/jquery.knob.js +++ b/js/jquery.knob.js @@ -578,7 +578,11 @@ ,v = s._validate(s.o.parse(s.$.val())) + (deltaX>0 || deltaY>0 ? s.o.step : deltaX<0 || deltaY<0 ? -s.o.step : 0); - v = max(min(v, s.o.max), s.o.min); + v = s.o.stopper ? max(min(v, s.o.max), s.o.min) : v; + + if (s.cH) { + s.cH(v); + } s.val(v, false);