(node: GraphNode, x: number, y: number, mixed: boolean, isNamed: boolean)
| 501 | const nodes: GraphNode[] = [], remap = new Map<number, number>(), sourceIds: number[] = [], namedIds: number[] = []; |
| 502 | const placements: import('./hierarchy-layout').HierarchyPlacement[] = []; |
| 503 | const place = (node: GraphNode, x: number, y: number, mixed: boolean, isNamed: boolean) => { |
| 504 | const id = nodes.length; |
| 505 | remap.set(node.id, id); sourceIds.push(node.id); nodes.push({ ...node, id, x, y, z: 0 }); |
| 506 | if (isNamed) namedIds.push(id); |
| 507 | placements.push({ id, key: node.qualified_name ?? `node:${node.id}`, name: node.name, hop: level.get(node.id)!, |
| 508 | ...(mixed ? { mixed: true } : { side: side.get(node.id)! }), x, y }); |
| 509 | }; |
| 510 | for (const key of keys) { |
| 511 | const { entries, cols, rows, gapX } = block.get(key)!; |
| 512 | // Outgoing blocks grow away from the root to the right, incoming ones to the left. |
no test coverage detected