Prevent infinite update when touching without moving

This commit is contained in:
Maxime Loizeau 2016-08-11 15:50:46 +01:00
parent 3719dd614c
commit 4c00a7fdb9

View File

@ -128,6 +128,11 @@ function bindTouchHandler(element, i, supportsTouch, supportsIePointer) {
return;
}
if(!speed.x && !speed.y) {
clearInterval(easingLoop);
return;
}
if (Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) {
clearInterval(easingLoop);
return;