(current: GraphData | undefined, stale: GraphData | undefined, layout: GraphData | undefined)
| 330 | * geladenen Layouts, ist die erste Vorschau leer, und als Platzhalter stand |
| 331 | * dann eine leere Flaeche statt des Graphen, der gerade noch zu sehen war. */ |
| 332 | export function scenePictureFor(current: GraphData | undefined, stale: GraphData | undefined, layout: GraphData | undefined): GraphData | undefined { |
| 333 | if (current && current.nodes.length > 0) return current; |
| 334 | if (stale && stale.nodes.length > 0) return stale; |
| 335 | return layout; |
| 336 | } |
| 337 | |
| 338 | export function limitGraphRender(data: GraphData, nodeLimit: number, edgeLimit: number, required: ReadonlySet<number> = new Set()): GraphData { |
| 339 | const nodes = [...data.nodes.filter(node => required.has(node.id)), ...data.nodes.filter(node => !required.has(node.id))] |
no outgoing calls
no test coverage detected