(options: Options)
| 119 | * It also checks for unsized elements and returns their IDs. |
| 120 | */ |
| 121 | export function setElements(options: Options) { |
| 122 | const { graph, initialElements } = options; |
| 123 | if (initialElements === undefined) { |
| 124 | return new Set<string>(); |
| 125 | } |
| 126 | const unsizedIds = new Set<string>(); |
| 127 | |
| 128 | // Process elements if provided. |
| 129 | graph.addCells(initialElements.map((item) => processElement(item, unsizedIds))); |
| 130 | return unsizedIds; |
| 131 | } |
no test coverage detected