touch trick ?

master
km0 3 years ago
parent a31dfcf23f
commit 10a31a5ad0

@ -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);

Loading…
Cancel
Save