(e: PointerEvent)
| 186 | }; |
| 187 | } else { |
| 188 | let onPointerMove = (e: PointerEvent) => { |
| 189 | if (e.pointerId === state.current.id) { |
| 190 | let pointerType = (e.pointerType || 'mouse') as PointerType; |
| 191 | |
| 192 | // Problems with PointerEvent#movementX/movementY: |
| 193 | // 1. it is always 0 on macOS Safari. |
| 194 | // 2. On Chrome Android, it's scaled by devicePixelRatio, but not on Chrome macOS |
| 195 | moveEvent( |
| 196 | e, |
| 197 | pointerType, |
| 198 | e.pageX - (state.current.lastPosition?.pageX ?? 0), |
| 199 | e.pageY - (state.current.lastPosition?.pageY ?? 0) |
| 200 | ); |
| 201 | state.current.lastPosition = {pageX: e.pageX, pageY: e.pageY}; |
| 202 | } |
| 203 | }; |
| 204 | |
| 205 | let onPointerUp = (e: PointerEvent) => { |
| 206 | if (e.pointerId === state.current.id) { |
nothing calls this directly
no outgoing calls
no test coverage detected