Maybe touch works correctly
This commit is contained in:
parent
8b0af7121a
commit
44e901d559
@ -25,11 +25,12 @@ function zoom(factor, imgName) {
|
||||
img.style.opacity = 0;
|
||||
});
|
||||
|
||||
img.addEventListener("mousemove", (e) => {
|
||||
img.addEventListener("touchmove", (e) => {
|
||||
e.preventDefault();
|
||||
moveBackground(getOffsetToMiddle(e));
|
||||
});
|
||||
|
||||
img.addEventListener("touchmove", (e) => {
|
||||
img.addEventListener("mousemove", (e) => {
|
||||
moveBackground(getOffsetToMiddle(e));
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user