(e: TouchEvent)
| 156 | } |
| 157 | }; |
| 158 | let onTouchEnd = (e: TouchEvent) => { |
| 159 | let touch = [...e.changedTouches].findIndex( |
| 160 | ({identifier}) => identifier === state.current.id |
| 161 | ); |
| 162 | if (touch >= 0) { |
| 163 | endEvent(e, 'touch'); |
| 164 | state.current.id = null; |
| 165 | let ownerWindow = getOwnerWindow(getEventTarget(e)); |
| 166 | removeGlobalListener(ownerWindow, 'touchmove', onTouchMove); |
| 167 | removeGlobalListener(ownerWindow, 'touchend', onTouchEnd); |
| 168 | removeGlobalListener(ownerWindow, 'touchcancel', onTouchEnd); |
| 169 | } |
| 170 | }; |
| 171 | moveProps.onTouchStart = (e: React.TouchEvent) => { |
| 172 | if (e.changedTouches.length === 0 || state.current.id != null) { |
| 173 | return; |
nothing calls this directly
no test coverage detected