Skip to content

Commit

Permalink
Added onZoomEnd call to balance the onZoomStart in the double-tap zoo…
Browse files Browse the repository at this point in the history
…m case
  • Loading branch information
iangilman committed Jul 21, 2011
1 parent edd6cf0 commit ce07669
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/iscroll.js
Expand Up @@ -489,6 +489,11 @@ iScroll.prototype = {
that.doubleTapTimer = null;
if (that.options.onZoomStart) that.options.onZoomStart.call(that, e);
that.zoom(that.pointX, that.pointY, that.scale == 1 ? that.options.doubleTapZoom : 1);
if (that.options.onZoomEnd) {
setTimeout(function() {
that.options.onZoomEnd.call(that, e);
}, 200); // 200 is default zoom duration
}
} else {
that.doubleTapTimer = setTimeout(function () {
that.doubleTapTimer = null;
Expand Down

0 comments on commit ce07669

Please sign in to comment.