Function
getTouchById
(event: TouchEvent, pointerId: null | number)
Source from the content-addressed store, hash-verified
| 1046 | } |
| 1047 | |
| 1048 | function getTouchById(event: TouchEvent, pointerId: null | number): null | Touch { |
| 1049 | const changedTouches = event.changedTouches; |
| 1050 | for (let i = 0; i < changedTouches.length; i++) { |
| 1051 | const touch = changedTouches[i]; |
| 1052 | if (touch.identifier === pointerId) { |
| 1053 | return touch; |
| 1054 | } |
| 1055 | } |
| 1056 | return null; |
| 1057 | } |
| 1058 | |
| 1059 | function createTouchEvent(target: FocusableElement, e: RTouchEvent<FocusableElement>): EventBase { |
| 1060 | let clientX = 0; |
Tested by
no test coverage detected