// compare positions
JsArray<Touch> currentTouches = event.getTouches();
for (int i = 0; i < currentTouches.length(); i++) {
Touch currentTouch = currentTouches.get(i);
for (int j = 0; j < startPositions.length(); j++) {
TouchCopy startTouch = startPositions.get(j);
if (currentTouch.getIdentifier() == startTouch.getIdentifier()) {
if (Math.abs(currentTouch.getPageX() - startTouch.getPageX()) > distance || Math.abs(currentTouch.getPageY() - startTouch.getPageY()) > distance) {
state = State.INVALID;
break;
}
}
if (state == State.INVALID) {