added touch support for zoom
This commit is contained in:
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…
x
Reference in New Issue
Block a user