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

Function useCreateLink

packages/joint-react/src/hooks/use-create-link.ts:17–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15 * ```
16 */
17export function useCreateLink<T extends dia.Link | GraphLink>() {
18 const graph = useGraph();
19 return useCallback(
20 (link: T) => {
21 graph.addCell(processLink(link));
22 },
23 [graph]
24 );
25}

Callers 1

Calls 3

useGraphFunction · 0.90
processLinkFunction · 0.90
addCellMethod · 0.80

Tested by

no test coverage detected