Skip to content

Commit

Permalink
try to prevent double tap on hint with stylus from zooming in
Browse files Browse the repository at this point in the history
  • Loading branch information
edloper committed Dec 8, 2024
1 parent 9a91ccf commit d8d1554
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions game_fullscreen.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<title>Missing Link</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<link rel="apple-touch-icon" sizes="180x180" href="images/thumbnail.png">
<link rel="apple-touch-icon" sizes="152x152" href="images/thumbnail.png">
<link rel="apple-touch-icon" sizes="167x167" href="images/thumbnail.png">
Expand Down
15 changes: 11 additions & 4 deletions javascript/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,17 @@ class Game {
reader.readAsDataURL(file);
}
});
$("#gameUndo").click(e => { this.undo(); e.preventDefault(); });
$("#gameHint").click(e => { this.hint(); e.preventDefault(); });
$("#gameUndo").dblclick(e => { e.preventDefault(); });
$("#gameHint").dblclick(e => { e.preventDefault(); });

$("#gameUndo")
.click(e => { this.undo(); e.preventDefault(); })
.dblclick(e => { e.preventDefault(); })
.on('pointerdown', e => { e.preventDefault(); })
.on('stylusdown', e => { e.preventDefault(); });
$("#gameHint")
.click(e => { this.hint(); e.preventDefault(); })
.dblclick(e => { e.preventDefault(); })
.on('pointerdown', e => { e.preventDefault(); })
.on('stylusdown', e => { e.preventDefault(); });
new ToggleButton($("#gameEasyMode"), {
label: "Easy Mode",
height: 30, width: 80,
Expand Down

0 comments on commit d8d1554

Please sign in to comment.