From 10a31a5ad0bf09b7aa81aac8f2ce544e02863f41 Mon Sep 17 00:00:00 2001 From: lzzfnc Date: Tue, 7 Dec 2021 21:33:44 +0100 Subject: [PATCH] touch trick ? --- sticker.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sticker.js b/sticker.js index 05a12e2..9fd3e33 100644 --- a/sticker.js +++ b/sticker.js @@ -32,6 +32,14 @@ function percentagePosition(e, target) { } window.addEventListener("click", (e) => { + placeSticker(e); +}); + +window.addEventListener("touchstart", (e) => { + placeSticker(e); +}); + +function getInput(e) { placeSticker(percentagePosition(e, stickerContainer), infoList[loopIndex]); // Cringe sorry @@ -40,7 +48,7 @@ window.addEventListener("click", (e) => { } else { loopIndex = 0; } -}); +} function placeSticker(position, element) { let sticker = element.cloneNode(true);