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

Function side

graph-ui/src/architecture/label-space.ts:8–9  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

6/** The padding plus border of a laid-out label on its thinner side, per axis. */
7export function labelEdges(style: Pick<CSSStyleDeclaration, 'getPropertyValue'>): [number, number] {
8 const side = (name: string) => (parseFloat(style.getPropertyValue(`padding-${name}`)) || 0)
9 + (parseFloat(style.getPropertyValue(`border-${name}-width`)) || 0);
10 return [Math.min(side('left'), side('right')), Math.min(side('top'), side('bottom'))];
11}
12

Callers 1

labelEdgesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected