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

Function overlaps

dashboard/graph/src/labelLayout.ts:39–46  ·  view source on GitHub ↗
(a: LabelBox, b: LabelBox)

Source from the content-addressed store, hash-verified

37}
38
39function overlaps(a: LabelBox, b: LabelBox): boolean {
40 return (
41 a.left - LABEL_PAD < b.right + LABEL_PAD &&
42 a.right + LABEL_PAD > b.left - LABEL_PAD &&
43 a.top - LABEL_PAD < b.bottom + LABEL_PAD &&
44 a.bottom + LABEL_PAD > b.top - LABEL_PAD
45 );
46}
47
48/** Returns the ids whose labels should render, in placement order. */
49export function selectLabels(boxes: LabelBox[], cap: number): string[] {

Callers 1

selectLabelsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected