16 console.log("Gesture started");
20 var deltax = mouse.x - startX;
21 var deltay = mouse.y - startY;
23 if (Math.abs(deltax) > 40 || Math.abs(deltay) > 40) {
24 if (deltax > 30 && Math.abs(deltay) < 30) {
27 } else if (deltax < -30 && Math.abs(deltay) < 30) {
30 } else if (Math.abs(deltax) < 30 && deltay > 30) {
33 } else if (Math.abs(deltax) < 30 && deltay < 30) {
37 console.log("Gesture ended");
40 console.log("Gesture ended with deltax = "+deltax);