From d8d1554e6b70a2701aead868b25d2355aa7de259 Mon Sep 17 00:00:00 2001 From: Edward Loper Date: Sat, 7 Dec 2024 20:37:41 -0500 Subject: [PATCH] try to prevent double tap on hint with stylus from zooming in --- game_fullscreen.html | 1 + javascript/game.js | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/game_fullscreen.html b/game_fullscreen.html index f057f8c..c195181 100644 --- a/game_fullscreen.html +++ b/game_fullscreen.html @@ -3,6 +3,7 @@ Missing Link + diff --git a/javascript/game.js b/javascript/game.js index 9d3a434..808b239 100644 --- a/javascript/game.js +++ b/javascript/game.js @@ -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,