(layout: Layout)
| 22 | * @returns The bottom Y coordinate (0 if layout is empty) |
| 23 | */ |
| 24 | export function bottom(layout: Layout): number { |
| 25 | let max = 0; |
| 26 | for (let i = 0; i < layout.length; i++) { |
| 27 | const item = layout[i]; |
| 28 | if (item !== undefined) { |
| 29 | const bottomY = item.y + item.h; |
| 30 | if (bottomY > max) max = bottomY; |
| 31 | } |
| 32 | } |
| 33 | return max; |
| 34 | } |
| 35 | |
| 36 | /** |
| 37 | * Get a layout item by its ID. |
no outgoing calls
no test coverage detected
searching dependent graphs…