(value: number)
| 24 | export const GRAPH_NODE_BUDGET_MAX = 10_000_000; |
| 25 | |
| 26 | export function clampNodeBudget(value: number): number { |
| 27 | if (!Number.isFinite(value)) return GRAPH_RENDER_NODE_LIMIT; |
| 28 | const stepped = |
| 29 | Math.round(value / GRAPH_NODE_BUDGET_STEP) * GRAPH_NODE_BUDGET_STEP; |
| 30 | if (stepped < GRAPH_NODE_BUDGET_STEP) return GRAPH_NODE_BUDGET_STEP; |
| 31 | if (stepped > GRAPH_NODE_BUDGET_MAX) return GRAPH_NODE_BUDGET_MAX; |
| 32 | return stepped; |
| 33 | } |
| 34 | |
| 35 | export async function fetchLayout( |
| 36 | project: string, |
no outgoing calls
no test coverage detected