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

Function cloneLayoutItem

src/core/layout.ts:81–100  ·  view source on GitHub ↗
(layoutItem: LayoutItem)

Source from the content-addressed store, hash-verified

79 * @returns A new layout item with the same properties
80 */
81export function cloneLayoutItem(layoutItem: LayoutItem): LayoutItem {
82 return {
83 i: layoutItem.i,
84 x: layoutItem.x,
85 y: layoutItem.y,
86 w: layoutItem.w,
87 h: layoutItem.h,
88 minW: layoutItem.minW,
89 maxW: layoutItem.maxW,
90 minH: layoutItem.minH,
91 maxH: layoutItem.maxH,
92 moved: Boolean(layoutItem.moved),
93 static: Boolean(layoutItem.static),
94 isDraggable: layoutItem.isDraggable,
95 isResizable: layoutItem.isResizable,
96 resizeHandles: layoutItem.resizeHandles,
97 constraints: layoutItem.constraints,
98 isBounded: layoutItem.isBounded
99 };
100}
101
102/**
103 * Clone an entire layout.

Callers 10

GridLayoutFunction · 0.85
useGridLayoutFunction · 0.85
compactFunction · 0.85
cloneLayoutFunction · 0.85
withLayoutItemFunction · 0.85
compactFunction · 0.85
compactItemFunction · 0.85
compactWrapFunction · 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…