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

Function pathLabelSpots

graph-ui/src/galaxy/PathLayer.tsx:73–84  ·  view source on GitHub ↗
(labels: readonly { index: number; from: { x: number; y: number }; to: { x: number; y: number }; size: { width: number; height: number } }[],
    blockers: readonly ScreenRect[])

Source from the content-addressed store, hash-verified

71 * frei steht. Ein spaeteres Label weicht den frueheren aus wie den Namen.
72 */
73export function pathLabelSpots(labels: readonly { index: number; from: { x: number; y: number }; to: { x: number; y: number }; size: { width: number; height: number } }[],
74 blockers: readonly ScreenRect[]): Map<number, { t: number; rect: ScreenRect }> {
75 const placed: ScreenRect[] = [];
76 const spots = new Map<number, { t: number; rect: ScreenRect }>();
77 for (const { index, from, to, size } of labels) {
78 const choice = placeAlongSegment(from, to, size, blockers, placed);
79 if (choice.overlap > 0) continue;
80 placed.push(choice.rect);
81 spots.set(index, { t: choice.t, rect: choice.rect });
82 }
83 return spots;
84}
85
86export function PathLayer({ nodes, path, namedRoots }: {
87 nodes: readonly GraphNode[];

Callers 2

PathLayerFunction · 0.85

Calls 2

placeAlongSegmentFunction · 0.90
pushMethod · 0.45

Tested by

no test coverage detected