MCPcopy
hub / github.com/react-grid-layout/react-grid-layout / bottom

Function bottom

src/core/layout.ts:24–34  ·  view source on GitHub ↗
(layout: Layout)

Source from the content-addressed store, hash-verified

22 * @returns The bottom Y coordinate (0 if layout is empty)
23 */
24export 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.

Callers 10

utils-test.jsFile · 0.90
GridLayoutFunction · 0.85
useGridLayoutFunction · 0.85
compactFunction · 0.85
compactItemInternalFunction · 0.85
compactFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…