MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / labelCapForArea

Function labelCapForArea

dashboard/graph/src/labelLayout.ts:33–37  ·  view source on GitHub ↗
(width: number, height: number)

Source from the content-addressed store, hash-verified

31 * desktop canvas allows a few dozen and a narrow panel only a handful.
32 */
33export function labelCapForArea(width: number, height: number): number {
34 const density = width < 520 ? 58_000 : 30_000;
35 const floor = width < 520 ? 4 : 6;
36 return Math.max(floor, Math.floor((width * height) / density));
37}
38
39function overlaps(a: LabelBox, b: LabelBox): boolean {
40 return (

Callers 1

renderFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected