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

Function cardHeight

ui/src/lib/flow-model.ts:71–75  ·  view source on GitHub ↗
(hop: WireFlowHop)

Source from the content-addressed store, hash-verified

69
70/** Exact rendered height of a card, which its CSS then pins. */
71export function cardHeight(hop: WireFlowHop): number {
72 const lines = hop.source?.lines?.length ?? 0;
73 const body = lines > 0 ? lines * CODE_LINE_HEIGHT + CODE_PADDING : NO_SOURCE_HEIGHT;
74 return HEADER_HEIGHT + body;
75}
76
77/* --------------------------------------------------------------- end cap -- */
78

Callers 2

buildFlowLayoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected