Permalink
Browse files

Added onZoomEnd call to balance the onZoomStart in the double-tap zoo…

…m case
  • Loading branch information...
1 parent edd6cf0 commit ce076695689e1a4a1f9cf62976f579cfa4633c4b @iangilman iangilman committed Jul 21, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/iscroll.js
View
@@ -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;

0 comments on commit ce07669

Please sign in to comment.