import * as d3 from 'd3'; import GraphView from './graph-view'; import { d3Selection, ICoord } from './util'; import SlotView from './slot-view'; import NodeView from './node-view'; import GEditor from './geditor'; export interface IEdge { id?: string; srcNodeId: string; destNodeId: string; srcSlotId: string; destSlotId: string; [key: string]: any; } export interface InitialSettings { edgeConfig: IEdge; graphView: GraphView; srcSlotView: SlotView; destSlotView: SlotView; geditor: GEditor; } export default class EdgeView { id: string; $el: d3Selection; srcNodeView: NodeView; destNodeView: NodeView; srcSlotView: SlotView; destSlotView: SlotView; protected geditor: GEditor; protected graphView: GraphView; protected points: [ICoord, ICoord]; protected lineGenerator: d3.Line; protected edgeConfig: IEdge; private $path; private $edgePath; private $edgeKey; private $textPath; private status; private edgeKey; constructor(settings: InitialSettings); protected render(edgeConfig: IEdge): void; protected initEvents(): void; protected detachEvents(): void; protected onClick(): void; protected onContextmenu(): void; update(): void; destroy(): void; hightlightStyle(toggle?: boolean): this; weakStyle(toggle?: boolean): this; copyEdgeConfig(replacement: IEdge): { id: string; originalId: string; srcNodeId: string; destNodeId: string; srcSlotId: string; destSlotId: string; }; getEditable(): boolean; handleSelected(options?: { [key: string]: any; }): void; handleDeselected(options?: { [key: string]: any; }): void; updateEdgeStatus(status: 'INITIALIZED' | 'READY'): void; updateEdgeKey(key: string): void; }