Function
getTouchById
(event: TouchEvent, pointerId: null | number)
Source from the content-addressed store, hash-verified
| 1067 | } |
| 1068 | |
| 1069 | function getTouchById(event: TouchEvent, pointerId: null | number): null | Touch { |
| 1070 | const changedTouches = event.changedTouches; |
| 1071 | for (let i = 0; i < changedTouches.length; i++) { |
| 1072 | const touch = changedTouches[i]; |
| 1073 | if (touch.identifier === pointerId) { |
| 1074 | return touch; |
| 1075 | } |
| 1076 | } |
| 1077 | return null; |
| 1078 | } |
| 1079 | |
| 1080 | function createTouchEvent(target: FocusableElement, e: RTouchEvent<FocusableElement>): EventBase { |
| 1081 | let clientX = 0; |
Tested by
no test coverage detected