(value: number)
| 397 | } | null>(null); |
| 398 | |
| 399 | const clampTimelineHeight = (value: number) => { |
| 400 | const available = layoutBounds.height ?? 0; |
| 401 | const maxHeight = |
| 402 | available > 0 |
| 403 | ? Math.max(MIN_TIMELINE_HEIGHT, available - MIN_PLAYER_HEIGHT) |
| 404 | : Number.POSITIVE_INFINITY; |
| 405 | const upperBound = Number.isFinite(maxHeight) |
| 406 | ? maxHeight |
| 407 | : Math.max(value, MIN_TIMELINE_HEIGHT); |
| 408 | return Math.min(Math.max(value, MIN_TIMELINE_HEIGHT), upperBound); |
| 409 | }; |
| 410 | |
| 411 | const timelineHeight = createMemo(() => |
| 412 | Math.round(clampTimelineHeight(storedTimelineHeight())), |
no outgoing calls
no test coverage detected