added touch support for zoom

master
Toerd@480 5 years ago
parent dff4845fea
commit 8b0af7121a

@ -29,6 +29,10 @@ function zoom(factor, imgName) {
moveBackground(getOffsetToMiddle(e)); moveBackground(getOffsetToMiddle(e));
}); });
img.addEventListener("touchmove", (e) => {
moveBackground(getOffsetToMiddle(e));
});
img.addEventListener("mouseleave", (e) => { img.addEventListener("mouseleave", (e) => {
img.style.opacity = 1; img.style.opacity = 1;
}); });

Loading…
Cancel
Save