Possibly consider adding some adjustments: || Math.abs(data.dy) > Math.abs(data.dx) - 50