touch trick ?

master
km0 3 years ago
parent a31dfcf23f
commit 10a31a5ad0

@ -32,6 +32,14 @@ function percentagePosition(e, target) {
} }
window.addEventListener("click", (e) => { window.addEventListener("click", (e) => {
placeSticker(e);
});
window.addEventListener("touchstart", (e) => {
placeSticker(e);
});
function getInput(e) {
placeSticker(percentagePosition(e, stickerContainer), infoList[loopIndex]); placeSticker(percentagePosition(e, stickerContainer), infoList[loopIndex]);
// Cringe sorry // Cringe sorry
@ -40,7 +48,7 @@ window.addEventListener("click", (e) => {
} else { } else {
loopIndex = 0; loopIndex = 0;
} }
}); }
function placeSticker(position, element) { function placeSticker(position, element) {
let sticker = element.cloneNode(true); let sticker = element.cloneNode(true);

Loading…
Cancel
Save