(e)
| 120 | } |
| 121 | |
| 122 | function omtouchmove(e) { |
| 123 | const { clientX, clientY } = e.touches[0]; |
| 124 | const deltaX = lastX - clientX; |
| 125 | const deltaY = lastY - clientY; |
| 126 | |
| 127 | // Determine if the user is primarily scrolling vertically |
| 128 | if (!isScrolling) { |
| 129 | isScrolling = Math.abs(deltaY) > Math.abs(deltaX); |
| 130 | } |
| 131 | |
| 132 | if (!isScrolling) { |
| 133 | moveX += deltaX; |
| 134 | e.preventDefault(); |
| 135 | } |
| 136 | |
| 137 | lastX = clientX; |
| 138 | lastY = clientY; |
| 139 | } |
| 140 | |
| 141 | function omtouchend() { |
| 142 | document.removeEventListener("touchmove", omtouchmove); |
nothing calls this directly
no test coverage detected