UNPKG

@gravity-ui/graph

Version:

Modern graph editor component

25 lines (24 loc) 1.21 kB
import { CoreComponentProps } from "lib/CoreComponent"; import { Component, TComponentState } from "../../../lib/Component"; import { ConnectionState } from "../../../store/connection/ConnectionState"; import { TGraphLayerContext } from "../layers/graphLayer/GraphLayer"; import { BatchPath2DRenderer } from "./BatchPath2D"; import { TConnectionProps } from "./BlockConnection"; export type TGraphConnectionsContext = TGraphLayerContext & { batch: BatchPath2DRenderer; }; export declare class BlockConnections extends Component<CoreComponentProps, TComponentState, TGraphConnectionsContext> { get connections(): ConnectionState[]; protected readonly unsubscribe: (() => void)[]; protected batch: BatchPath2DRenderer; /** * Debounced update to batch multiple changes into a single render cycle. * Uses high priority and single frame interval for responsive updates. */ private scheduleUpdate; constructor(props: {}, parent: Component); protected subscribe(): (() => void)[]; protected unmount(): void; protected updateChildren(): import("lib/CoreComponent").ComponentDescriptor<TConnectionProps, TGraphConnectionsContext>[]; protected render(): void; }