import { Link } from '../renderables/Link'; import { ShapeRenderer } from '../renderers/shapes/ShapeRenderer'; import { Edge } from '../types/Edge'; import { Node } from '../types/Node'; import { LinkSet } from './LinkSet'; declare abstract class Router { private _edgeLinkMap; private _groupLinkMap; private _linkEdgeMap; private _nameNodeMap; private _nodeEdgeMap; private _ungroupedLinks; protected _collapse: boolean; protected _bundleMap: LinkSet; protected _nodeShapeMap: Map; protected constructor(); abstract calculateLink(link: Link, source: Node, target: Node, group: Link[]): void; /** * Get all links in the provided groups. If no groups are provided, all * links are returned. * @param groups An array of group names */ getLinks(groups?: string[]): Link[]; /** * Get a map of links to edge arrays. A single link can be used to represent * multiple edges, and this map can be used to determine which edges are * represented by any given link. */ getLinkMap(): Map; /** * Get all links whose edges are not part of a group */ getUngroupedLinks(): Link[]; /** * Set the nodes and edges and recalculate all links. * @param nodes An array of nodes * @param edges An array of edges * @param shapes The shape renderers used to render the nodes */ setData(nodes: Node[], edges: Edge[], shapes: ShapeRenderer[]): void; /** * Calculate all links */ updateLinks(): void; /** * Calculate links connected to the given node. Returns the array of links * that were recalculated. * @param node A node */ updateLinksConnectedTo(node: Node): Link[]; /** * Calculate the pixel offsets for the first and last points of a link. * These offsets place links (the origins and arrowheads) at the edges * of the shapes rather than the centers. * @param link The link to process * @param source The source point shape renderer * @param target The target point shape renderer * @private */ protected _calcalateShapeOffsets(link: Link, source?: ShapeRenderer, target?: ShapeRenderer): void; } export { Router };