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

Function getLink

packages/joint-react/src/utils/cell/get-cell.ts:63–76  ·  view source on GitHub ↗
(cell: dia.Cell<dia.Cell.Attributes>)

Source from the content-addressed store, hash-verified

61 * ```
62 */
63export function getLink(cell: dia.Cell<dia.Cell.Attributes>): GraphLink {
64 return {
65 ...cell.attributes,
66 id: cell.id,
67 isElement: false,
68 isLink: true,
69 source: cell.get('source') as dia.Cell.ID,
70 target: cell.get('target') as dia.Cell.ID,
71 type: cell.attributes.type,
72 z: cell.get('z'),
73 markup: cell.get('markup'),
74 defaultLabel: cell.get('defaultLabel'),
75 };
76}
77
78/**
79 * Get cell via cell

Callers 3

get-cell.test.tsFile · 0.90
updateStoreFunction · 0.90
getCellFunction · 0.70

Calls 1

getMethod · 0.45

Tested by

no test coverage detected