Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed mistaken use of wheelDeltaY instead of deltaScale in _wheel's z…

…oom code
  • Loading branch information...
commit 10a4dc55f79ebbf6e1a5fca0ff5d1c6abf3ba92e 1 parent edd6cf0
@iangilman iangilman authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/iscroll.js
View
8 src/iscroll.js
@@ -610,14 +610,14 @@ iScroll.prototype = {
if (that.options.wheelAction == 'zoom') {
deltaScale = that.scale * Math.pow(2, 1/3 * (wheelDeltaY ? wheelDeltaY / Math.abs(wheelDeltaY) : 0));
- if (wheelDeltaY < that.options.zoomMin) wheelDeltaY = that.options.zoomMin;
- if (wheelDeltaY > that.options.zoomMax) wheelDeltaY = that.options.zoomMax;
+ if (deltaScale < that.options.zoomMin) deltaScale = that.options.zoomMin;
+ if (deltaScale > that.options.zoomMax) deltaScale = that.options.zoomMax;
- if (wheelDeltaY != that.scale) {
+ if (deltaScale != that.scale) {
if (!that.wheelZoomCount && that.options.onZoomStart) that.options.onZoomStart.call(that, e);
that.wheelZoomCount++;
- that.zoom(e.pageX, e.pageY, wheelDeltaY, 400);
+ that.zoom(e.pageX, e.pageY, deltaScale, 400);
setTimeout(function() {
that.wheelZoomCount--;
Please sign in to comment.
Something went wrong with that request. Please try again.