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

Function routeOf

ui/src/lib/map-model.ts:394–398  ·  view source on GitHub ↗
(link: { source: string; target: string })

Source from the content-addressed store, hash-verified

392 // that asked for a port pitch needs it now: a hub with nineteen lines
393 // leaving its bottom edge is widened to hold them.
394 const routeOf = (link: { source: string; target: string }): EdgeRoute => {
395 const from = layer.get(link.source) ?? 0;
396 const to = layer.get(link.target) ?? 0;
397 return from > to ? 'down' : from < to ? 'up' : 'level';
398 };
399 const sidesOf = (route: EdgeRoute): { source: 'top' | 'bottom'; target: 'top' | 'bottom' } => {
400 if (!directional || route === 'down') return { source: 'bottom', target: 'top' };
401 if (route === 'up') return { source: 'top', target: 'bottom' };

Callers 1

buildMapLayoutFunction · 0.70

Calls 1

getMethod · 0.65

Tested by

no test coverage detected