Permalink
Browse files

Merge pull request #170 from Viximo/android-performance-improvement

First move event can be dropped, leading to perception of poor performance on Android devices.
  • Loading branch information...
2 parents 332986c + 3e6d0bf commit f67643690c29259676ecb36c2cb51aab777e29b7 @cubiq committed Jan 19, 2012
Showing with 10 additions and 10 deletions.
  1. +5 −5 src/iscroll-lite.js
  2. +5 −5 src/iscroll.js
View
@@ -235,12 +235,12 @@ iScroll.prototype = {
newY = that.options.bounce ? that.y + (deltaY / 2) : newY >= 0 || that.maxScrollY >= 0 ? 0 : that.maxScrollY;
}
- if (that.absDistX < 6 && that.absDistY < 6) {
- that.distX += deltaX;
- that.distY += deltaY;
- that.absDistX = m.abs(that.distX);
- that.absDistY = m.abs(that.distY);
+ that.distX += deltaX;
+ that.distY += deltaY;
+ that.absDistX = m.abs(that.distX);
+ that.absDistY = m.abs(that.distY);
+ if (that.absDistX < 6 && that.absDistY < 6) {
return;
}
View
@@ -426,12 +426,12 @@ iScroll.prototype = {
newY = that.options.bounce ? that.y + (deltaY / 2) : newY >= that.minScrollY || that.maxScrollY >= 0 ? that.minScrollY : that.maxScrollY;
}
- if (that.absDistX < 6 && that.absDistY < 6) {
- that.distX += deltaX;
- that.distY += deltaY;
- that.absDistX = m.abs(that.distX);
- that.absDistY = m.abs(that.distY);
+ that.distX += deltaX;
+ that.distY += deltaY;
+ that.absDistX = m.abs(that.distX);
+ that.absDistY = m.abs(that.distY);
+ if (that.absDistX < 6 && that.absDistY < 6) {
return;
}

0 comments on commit f676436

Please sign in to comment.