mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-24 15:33:29 +02:00
Use pointer events instead of touch events in TouchControl
This commit is contained in:
parent
7001f78beb
commit
3070cb1ee7
@ -61,12 +61,12 @@ export class TouchControl {
|
||||
* event, removes the keydown state, and removes the 'active' class from the node and the last touched element.
|
||||
*/
|
||||
bindKey(node: HTMLElement, key: string) {
|
||||
node.addEventListener("touchstart", event => {
|
||||
node.addEventListener("pointerdown", event => {
|
||||
event.preventDefault();
|
||||
this.touchButtonDown(node, key);
|
||||
});
|
||||
|
||||
node.addEventListener("touchend", event => {
|
||||
node.addEventListener("pointerup", event => {
|
||||
event.preventDefault();
|
||||
this.touchButtonUp(node, key, event.target?.["id"]);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user