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

Function box

graph-ui/tools/handtest-fixes-galaxy.mjs:649–649  ·  view source on GitHub ↗
(r)

Source from the content-addressed store, hash-verified

647 const inside = canvas ? centres.every((c) => c.x > canvas.left && c.x < canvas.right && c.y > canvas.top && c.y < canvas.bottom) : false;
648 const underPanel = panel ? centres.filter((c) => c.x > panel.left && c.x < panel.right && c.y > panel.top && c.y < panel.bottom).length : 0;
649 const box = (r) => `${r.text}@${Math.round(r.left)},${Math.round(r.top)},${Math.round(r.right)},${Math.round(r.bottom)}`;
650 return { labels: labels.length, names: names.map((n) => n.text), overlaps, spreadPx: Math.round(spread), inside, underPanel,
651 boxes: overlaps.length ? [...labels, ...names].map(box) : undefined,
652 camera: globalThis.__atlasGalaxyFit?.measure?.().camera.position.map((v) => Math.round(v)) ?? null };

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected