UNPKG

d3-graph-controller

Version:

A TypeScript library for visualizing and simulating directed, interactive graphs.

23 lines (22 loc) 1.06 kB
import { GraphConfig } from '../config/config.mjs'; import { NodeTypeToken } from '../model/graph.mjs'; import { GraphLink } from '../model/link.mjs'; import { GraphNode } from '../model/node.mjs'; export declare function terminateEvent(event: Event): void; export declare function isNumber(value: unknown): value is number; export declare function getNodeRadius<T extends NodeTypeToken, Node extends GraphNode<T>, Link extends GraphLink<T, Node>>(config: GraphConfig<T, Node, Link>, node: Node): number; /** * Get the id of a link. * @param link - The link. */ export declare function getLinkId<T extends NodeTypeToken, Node extends GraphNode<T>, Link extends GraphLink<T, Node>>(link: Link): string; /** * Get the ID of a marker. * @param color - The color of the link. */ export declare function getMarkerId(color: string): string; /** * Get the URL of a marker. * @param link - The link of the marker. */ export declare function getMarkerUrl<T extends NodeTypeToken, Node extends GraphNode<T>, Link extends GraphLink<T, Node>>(link: Link): string;