MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / nodeWidth

Function nodeWidth

ui/src/lib/map-model.ts:104–110  ·  view source on GitHub ↗
(label: string, meta = '')

Source from the content-addressed store, hash-verified

102 * clipped to an ellipsis is worse than a slightly wider box.
103 */
104export function nodeWidth(label: string, meta = ''): number {
105 return Math.max(
106 MIN_NODE_WIDTH,
107 label.length * CHAR_WIDTH + LABEL_PADDING,
108 meta.length * META_CHAR_WIDTH + META_PADDING
109 );
110}
111
112/**
113 * The second line of a module box — and the string {@link nodeWidth} sizes for.

Callers 3

widthOfFunction · 0.90
buildMapLayoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected