(data: GraphPhase, rememberedSelection: SelectionStorage)
| 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 |
no test coverage detected