Skip to content

Commit

Permalink
optimizing...
Browse files Browse the repository at this point in the history
  • Loading branch information
Rongbin99 committed Jan 23, 2024
1 parent 3d59adb commit 61a360e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 2048.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ function handleTouchMove(event) {
var dY = touchEndY - touchStartY;

//detecting touch movement thresholds
if ((Math.abs(dX) > 0.5) || (Math.abs(dY) > 0.5)) {//touchscreen deadzone
if ((Math.abs(dX) > 1) || (Math.abs(dY) > 1)) {//touchscreen deadzone
//determine direction of swipe
if (Math.abs(dX) > Math.abs(dY)) {//X movement > than Y
if (dX > 0) {
Expand Down

0 comments on commit 61a360e

Please sign in to comment.