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

Function span

graph-ui/src/pseudocode/flow-diagram.test.ts:107–110  ·  view source on GitHub ↗
(x: number, text: string, anchor: 'start' | 'middle' | 'end')

Source from the content-addressed store, hash-verified

105 // oder er steht links von seiner Linie, und in beiden Faellen ganz
106 // innerhalb des Bildes.
107 const span = (x: number, text: string, anchor: 'start' | 'middle' | 'end'): number[] => {
108 const width = text.length * DIAGRAM_LABEL_CHAR_WIDTH;
109 return anchor === 'end' ? [x - width, x] : [x, x + width];
110 };
111 const boxed = [
112 ...diagram.loops.map((loop) => span(loop.labelX, loop.label, loop.labelAnchor)),
113 ...diagram.arrows

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected