import { SimulationLinkDatum } from 'd3'; import { Node } from './node.model'; export class Link implements SimulationLinkDatum { index?: number; thickness: number; color: string; selected: boolean; source: Node; target: Node; constructor(source, target) { this.source = source; this.target = target; this.reset(); } reset(): void { this.thickness = 1; this.color = null; this.selected = false; } get forceFactor(): number { return this.selected || this.color ? 1.5 : 1; } }