(layoutItem: LayoutItem)
| 79 | * @returns A new layout item with the same properties |
| 80 | */ |
| 81 | export 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. |
no outgoing calls
no test coverage detected
searching dependent graphs…