Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit f67643690c29259676ecb36c2cb51aab777e29b7 2 parents 332986c + 3e6d0bf
@cubiq authored
Showing with 10 additions and 10 deletions.
  1. +5 −5 src/iscroll-lite.js
  2. +5 −5 src/iscroll.js
View
10 src/iscroll-lite.js
@@ -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
10 src/iscroll.js
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.