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

Function overlapArea

graph-ui/src/galaxy/path-frame.ts:73–77  ·  view source on GitHub ↗
(a: ScreenRect, b: ScreenRect)

Source from the content-addressed store, hash-verified

71const LABEL_PAD = 2;
72
73function overlapArea(a: ScreenRect, b: ScreenRect): number {
74 const width = Math.min(a.right, b.right + LABEL_PAD) - Math.max(a.left, b.left - LABEL_PAD);
75 const height = Math.min(a.bottom, b.bottom + LABEL_PAD) - Math.max(a.top, b.top - LABEL_PAD);
76 return width > 0 && height > 0 ? width * height : 0;
77}
78
79const SIDES = [0, 1, -1, 2, -2, 3, -3];
80/* Wie nah ein Label seinen Enden kommen darf, wenn es nur so frei steht: dort laufen die Linien eines Knotens zusammen. */

Callers 1

tryAtFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected