(e: TouchEvent)
| 158 | } |
| 159 | }; |
| 160 | let onTouchEnd = (e: TouchEvent) => { |
| 161 | let touch = [...e.changedTouches].findIndex( |
| 162 | ({identifier}) => identifier === state.current.id |
| 163 | ); |
| 164 | if (touch >= 0) { |
| 165 | // eslint-disable-next-line react-hooks/rules-of-hooks |
| 166 | endEvent(e, 'touch'); |
| 167 | state.current.id = null; |
| 168 | let ownerWindow = getOwnerWindow(getEventTarget(e) as Element); |
| 169 | removeGlobalListener(ownerWindow, 'touchmove', onTouchMove); |
| 170 | removeGlobalListener(ownerWindow, 'touchend', onTouchEnd); |
| 171 | removeGlobalListener(ownerWindow, 'touchcancel', onTouchEnd); |
| 172 | } |
| 173 | }; |
| 174 | moveProps.onTouchStart = (e: React.TouchEvent) => { |
| 175 | if (e.changedTouches.length === 0 || state.current.id != null) { |
| 176 | return; |
nothing calls this directly
no test coverage detected