mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 00:36:25 +00:00
put the preventElementZoom call into a method instead to call it from anywhere/anytime we import it (#1515)
This commit is contained in:
parent
a163a420bd
commit
0385a90f08
@ -3,6 +3,8 @@ export const keysDown = new Map();
|
||||
let lastTouchedId;
|
||||
|
||||
export function initTouchControls(buttonMap) {
|
||||
const dpadDiv = document.querySelector("#dpad");
|
||||
preventElementZoom(dpadDiv);
|
||||
for (const button of document.querySelectorAll("[data-key]")) {
|
||||
// @ts-ignore
|
||||
bindKey(button, button.dataset.key, buttonMap);
|
||||
@ -138,6 +140,3 @@ function preventElementZoom(element) {
|
||||
event.target.click();
|
||||
});
|
||||
}
|
||||
|
||||
const dpadDiv = document.querySelector("#dpad");
|
||||
preventElementZoom(dpadDiv);
|
||||
|
Loading…
Reference in New Issue
Block a user