Change delta calculation in mousewheel handler.

The new version of jquery-mousewheel's delta values are changed,
and should use the new calculation for the values.
This commit is contained in:
Hyunje Alex Jun 2014-01-26 01:33:52 +09:00
parent a9000d4b6d
commit aa0b57c51d

View File

@ -272,7 +272,10 @@
// bind handlers
var bindMouseWheelHandler = function () {
var shouldPrevent = false;
$this.bind('mousewheel' + eventClassName, function (e, delta, deltaX, deltaY) {
$this.bind('mousewheel' + eventClassName, function (e, deprecatedDelta, deprecatedDeltaX, deprecatedDeltaY) {
var deltaX = e.deltaX ? e.deltaX / 10 : deprecatedDeltaX,
deltaY = e.deltaY ? e.deltaY / 10 : deprecatedDeltaY;
if (!settings.useBothWheelAxes) {
// deltaX will only be used for horizontal scrolling and deltaY will
// only be used for vertical scrolling - this is the default