( cell: dia.Cell<JointAttributes> )
| 28 | * ``` |
| 29 | */ |
| 30 | export function getElement<Element extends GraphElement = GraphElement>( |
| 31 | cell: dia.Cell<JointAttributes> |
| 32 | ): Element { |
| 33 | const { size, position, ...attributes } = cell.attributes; |
| 34 | return { |
| 35 | ...attributes, |
| 36 | ...position, |
| 37 | ...size, |
| 38 | id: cell.id, |
| 39 | isElement: true, |
| 40 | isLink: false, |
| 41 | data: cell.attributes.data, |
| 42 | type: cell.attributes.type, |
| 43 | ports: cell.get('ports'), |
| 44 | }; |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Get link via cell |
no test coverage detected