MCPcopy
hub / github.com/clientIO/joint / setElements

Function setElements

packages/joint-react/src/utils/cell/set-cells.ts:121–131  ·  view source on GitHub ↗
(options: Options)

Source from the content-addressed store, hash-verified

119 * It also checks for unsized elements and returns their IDs.
120 */
121export 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}

Callers 2

createStoreFunction · 0.90
usePaperElementRendererFunction · 0.85

Calls 2

processElementFunction · 0.85
mapMethod · 0.80

Tested by

no test coverage detected