MCPcopy Create free account
hub / github.com/nodejs/node / createGraph

Method createGraph

deps/v8/tools/turbolizer/src/views/graph-view.ts:457–476  ·  view source on GitHub ↗
(data: GraphPhase, rememberedSelection: SelectionStorage)

Source from the content-addressed store, hash-verified

455 }
456
457 private createGraph(data: GraphPhase, rememberedSelection: SelectionStorage): SelectionStorage {
458 this.graph = new Graph(data);
459 this.graphLayout = new GraphLayout(this.graph);
460
461 if (!this.state.cacheLayout ||
462 this.graph.graphPhase.stateType == GraphStateType.NeedToFullRebuild) {
463 this.updateGraphStateType(GraphStateType.NeedToFullRebuild);
464 this.showControlAction(this);
465 } else {
466 this.showVisible();
467 }
468
469 const adaptedSelection = this.adaptSelection(rememberedSelection);
470
471 this.graph.makeEdgesVisible();
472
473 this.layoutGraph();
474 this.updateGraphVisibility();
475 return adaptedSelection;
476 }
477
478 private layoutGraph(): void {
479 const layoutMessage = this.graph.graphPhase.stateType == GraphStateType.Cached

Callers 1

initializeContentMethod · 0.95

Calls 5

showControlActionMethod · 0.95
adaptSelectionMethod · 0.95
layoutGraphMethod · 0.95
updateGraphVisibilityMethod · 0.95
makeEdgesVisibleMethod · 0.80

Tested by

no test coverage detected