mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 15:07:13 +08:00
Don't momentum if no pixel change Fixed #61
This commit is contained in:
7
dist/js/ionic.js
vendored
7
dist/js/ionic.js
vendored
@ -2847,7 +2847,7 @@ window.ionic = {
|
|||||||
var scrollTop = e.scrollTop;
|
var scrollTop = e.scrollTop;
|
||||||
|
|
||||||
var highWater = Math.max(0, e.scrollTop + this.virtualRemoveThreshold);
|
var highWater = Math.max(0, e.scrollTop + this.virtualRemoveThreshold);
|
||||||
var lowWater = Math.min(scrollHeight - viewportHeight, Math.abs(e.scrollTop) + viewportHeight + this.virtualAddThreshold);
|
var lowWater = Math.min(scrollHeight, Math.abs(e.scrollTop) + viewportHeight + this.virtualAddThreshold);
|
||||||
|
|
||||||
var itemsPerViewport = Math.floor((lowWater - highWater) / itemHeight);
|
var itemsPerViewport = Math.floor((lowWater - highWater) / itemHeight);
|
||||||
var first = parseInt(Math.abs(highWater / itemHeight));
|
var first = parseInt(Math.abs(highWater / itemHeight));
|
||||||
@ -3276,6 +3276,11 @@ window.ionic = {
|
|||||||
} else {
|
} else {
|
||||||
y = this.y;
|
y = this.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(ox == x && oy == y) {
|
||||||
|
time = 0;
|
||||||
|
}
|
||||||
|
|
||||||
var dx = ox - x;
|
var dx = ox - x;
|
||||||
var dy = oy - y;
|
var dy = oy - y;
|
||||||
|
|
||||||
|
|||||||
@ -414,7 +414,7 @@
|
|||||||
var scrollTop = e.scrollTop;
|
var scrollTop = e.scrollTop;
|
||||||
|
|
||||||
var highWater = Math.max(0, e.scrollTop + this.virtualRemoveThreshold);
|
var highWater = Math.max(0, e.scrollTop + this.virtualRemoveThreshold);
|
||||||
var lowWater = Math.min(scrollHeight - viewportHeight, Math.abs(e.scrollTop) + viewportHeight + this.virtualAddThreshold);
|
var lowWater = Math.min(scrollHeight, Math.abs(e.scrollTop) + viewportHeight + this.virtualAddThreshold);
|
||||||
|
|
||||||
var itemsPerViewport = Math.floor((lowWater - highWater) / itemHeight);
|
var itemsPerViewport = Math.floor((lowWater - highWater) / itemHeight);
|
||||||
var first = parseInt(Math.abs(highWater / itemHeight));
|
var first = parseInt(Math.abs(highWater / itemHeight));
|
||||||
|
|||||||
@ -145,6 +145,11 @@
|
|||||||
} else {
|
} else {
|
||||||
y = this.y;
|
y = this.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(ox == x && oy == y) {
|
||||||
|
time = 0;
|
||||||
|
}
|
||||||
|
|
||||||
var dx = ox - x;
|
var dx = ox - x;
|
||||||
var dy = oy - y;
|
var dy = oy - y;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user