enable pointer movement after timeout
This commit is contained in:
parent
08a7df30e5
commit
b96247c181
2 changed files with 7 additions and 5 deletions
File diff suppressed because one or more lines are too long
|
|
@ -258,9 +258,11 @@ function handleMove(evt) {
|
||||||
if (idx < 0) {
|
if (idx < 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
var dist = Math.sqrt(Math.pow(touches[i].pageX - ongoingTouches[idx].pageXStart, 2) + Math.pow(touches[i].pageY - ongoingTouches[idx].pageYStart, 2));
|
if (!touchMoved) {
|
||||||
if (ongoingTouches.length > TOUCH_MOVE_THRESHOLD.length || dist > TOUCH_MOVE_THRESHOLD[ongoingTouches.length - 1]) {
|
var dist = Math.sqrt(Math.pow(touches[i].pageX - ongoingTouches[idx].pageXStart, 2) + Math.pow(touches[i].pageY - ongoingTouches[idx].pageYStart, 2));
|
||||||
touchMoved = true;
|
if (ongoingTouches.length > TOUCH_MOVE_THRESHOLD.length || dist > TOUCH_MOVE_THRESHOLD[ongoingTouches.length - 1] || evt.timeStamp - touchStart >= TOUCH_TIMEOUT) {
|
||||||
|
touchMoved = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var dx = touches[i].pageX - ongoingTouches[idx].pageX;
|
var dx = touches[i].pageX - ongoingTouches[idx].pageX;
|
||||||
var dy = touches[i].pageY - ongoingTouches[idx].pageY;
|
var dy = touches[i].pageY - ongoingTouches[idx].pageY;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue