Skip to content

Commit

Permalink
remove scroling during the game
Browse files Browse the repository at this point in the history
  • Loading branch information
maksym2493 committed Dec 25, 2024
1 parent 08d2dc5 commit b349f98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scripts/swipeHandler.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
let startX, startY, endX, endY;
const minDistance = 30;
const minDistance = 15;

export function onTouchStart(e) {
e.preventDefault();

const touch = e.touches[0];

startX = touch.pageX;
Expand Down
2 changes: 2 additions & 0 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ body {
font-family: sans-serif;
font-size: 24px;
font-weight: 900;

touch-action: none;
}

.field-cell {
Expand Down

0 comments on commit b349f98

Please sign in to comment.