First frame where the selector is visible at/above the appear threshold.
( frames: MotionFrame[], selector: string, )
| 53 | |
| 54 | /** First frame where the selector is visible at/above the appear threshold. */ |
| 55 | function firstAppear( |
| 56 | frames: MotionFrame[], |
| 57 | selector: string, |
| 58 | ): { time: number; rect: LayoutRect } | null { |
| 59 | for (const frame of frames) { |
| 60 | const sample = frame.data[selector]; |
| 61 | if (sample && sample.visible && sample.opacity >= APPEAR_OPACITY) { |
| 62 | return { time: frame.time, rect: sample.rect }; |
| 63 | } |
| 64 | } |
| 65 | return null; |
| 66 | } |
| 67 | |
| 68 | function missingIssue(selector: string, time: number): LayoutIssue { |
| 69 | return { |
no outgoing calls
no test coverage detected