/** * Canvas-based Graph Renderer * High-performance graph visualization using HTML5 Canvas and d3-force */ import { Component, ChangeDetectionStrategy, input, output, signal, computed, effect, viewChild, ElementRef, afterNextRender, OnDestroy, inject } from '@angular/core'; import { CommonModule } from '@angular/common'; import { GraphNodeWithVisuals, GraphLink, SimulationNode } from './graph-data.types'; import { GraphConfig } from './graph-settings.types'; import { SpatialIndex, drawArrow } from './graph.utils'; import { GraphLayoutService, type GraphLayoutSession } from './graph-layout.service'; import { DestroyRef } from '@angular/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; interface TooltipData { node: GraphNodeWithVisuals; x: number; y: number; } @Component({ selector: 'app-graph-canvas', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `