(offset: Point = { y: 0, x: 0 }, options?: ScrollEventOptions)
| 15 | * - Android: `{"contentInset": {"bottom": 0, "left": 0, "right": 0, "top": 0}, "contentOffset": {"x": 0, "y": 31.619047164916992}, "contentSize": {"height": 1624.761962890625, "width": 411.4285583496094}, "layoutMeasurement": {"height": 785.5238037109375, "width": 411.4285583496094}, "responderIgnoreScroll": true, "target": 139, "velocity": {"x": -1.3633992671966553, "y": -1.3633992671966553}}` |
| 16 | */ |
| 17 | export function buildScrollEvent(offset: Point = { y: 0, x: 0 }, options?: ScrollEventOptions) { |
| 18 | return { |
| 19 | ...baseSyntheticEvent(), |
| 20 | nativeEvent: { |
| 21 | contentInset: { bottom: 0, left: 0, right: 0, top: 0 }, |
| 22 | contentOffset: { y: offset.y, x: offset.x }, |
| 23 | contentSize: { |
| 24 | height: options?.contentSize?.height ?? 0, |
| 25 | width: options?.contentSize?.width ?? 0, |
| 26 | }, |
| 27 | layoutMeasurement: { |
| 28 | height: options?.layoutMeasurement?.height ?? 0, |
| 29 | width: options?.layoutMeasurement?.width ?? 0, |
| 30 | }, |
| 31 | responderIgnoreScroll: true, |
| 32 | target: 0, |
| 33 | velocity: { y: 0, x: 0 }, |
| 34 | }, |
| 35 | }; |
| 36 | } |
no test coverage detected
searching dependent graphs…