MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / place

Function place

graph-ui/src/galaxy/graph-scope.ts:503–509  ·  view source on GitHub ↗
(node: GraphNode, x: number, y: number, mixed: boolean, isNamed: boolean)

Source from the content-addressed store, hash-verified

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.

Callers 1

scopedHierarchyFunction · 0.70

Calls 2

getMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected