(e: TouchEvent)
| 141 | }; |
| 142 | |
| 143 | let onTouchMove = (e: TouchEvent) => { |
| 144 | let touch = [...e.changedTouches].findIndex( |
| 145 | ({identifier}) => identifier === state.current.id |
| 146 | ); |
| 147 | if (touch >= 0) { |
| 148 | let {pageX, pageY} = e.changedTouches[touch]; |
| 149 | moveEvent( |
| 150 | e, |
| 151 | 'touch', |
| 152 | pageX - (state.current.lastPosition?.pageX ?? 0), |
| 153 | pageY - (state.current.lastPosition?.pageY ?? 0) |
| 154 | ); |
| 155 | state.current.lastPosition = {pageX, pageY}; |
| 156 | } |
| 157 | }; |
| 158 | let onTouchEnd = (e: TouchEvent) => { |
| 159 | let touch = [...e.changedTouches].findIndex( |
| 160 | ({identifier}) => identifier === state.current.id |
nothing calls this directly
no outgoing calls
no test coverage detected