Skip to content

Commit

Permalink
Fixed bugs for desktop compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
aseemk committed Mar 4, 2011
1 parent 97e0158 commit 3427b61
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/iscroll.js 100644 → 100755
Expand Up @@ -7,6 +7,7 @@
* http://cubiq.org/dropbox/mit-license.txt
*
* Version 4.0 dev.rel. - Last updated: 2011.02.08
* Forked by Aseem Kishore in order to improve zooming.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
Expand Down Expand Up @@ -315,7 +316,7 @@ iScroll.prototype = {

e.preventDefault();

if (e.touches.length == 2 && that.options.zoom && hasGesture) {
if (e.touches && e.touches.length == 2 && that.options.zoom && hasGesture) {
// As object position might change over time, we calculate the offset each time (overkill?)
el = that.wrapper;
do {
Expand Down Expand Up @@ -365,7 +366,7 @@ iScroll.prototype = {
},

_move: function (e) {
if (e.touches.length > 1) return;
if (e.touches && e.touches.length > 1) return;

var that = this,
point = hasTouch ? e.changedTouches[0] : e,
Expand Down Expand Up @@ -438,7 +439,7 @@ iScroll.prototype = {
},

_end: function (e) {
if (e.touches.length != 0) return;
if (e.touches && e.touches.length != 0) return;

var that = this,
point = hasTouch ? e.changedTouches[0] : e,
Expand Down

0 comments on commit 3427b61

Please sign in to comment.