@gravity-ui/graph
Version:
Modern graph editor component
51 lines (50 loc) • 3.37 kB
TypeScript
import { Component } from "../../../lib/Component";
import { CoreComponent } from "../../../lib/CoreComponent";
import { BlockState } from "../../../store/block/Block";
import { TGraphLayerContext } from "../layers/graphLayer/GraphLayer";
import { Block } from "./Block";
export declare class Blocks extends Component {
protected blocks: BlockState[];
protected blocksView: {};
context: TGraphLayerContext;
protected readonly unsubscribe: (() => void)[];
private font;
constructor(props: {}, context: CoreComponent);
protected getFontScale(): number | boolean | typeof Component | import("../../..").ECanDrag | {
new (props: import("../connections").TConnectionProps, parent: import("../connections/BlockConnections").BlockConnections): import("../connections").BlockConnection<{
id?: import("../../..").TConnectionId;
sourceBlockId?: import("../../../store/block/Block").TBlockId;
targetBlockId?: import("../../../store/block/Block").TBlockId;
sourceAnchorId?: string;
targetAnchorId?: string;
sourcePortId?: import("../../../store/connection/port/Port").TPortId;
targetPortId?: import("../../../store/connection/port/Port").TPortId;
label?: string;
styles?: Partial<import("../../../graphConfig").TConnectionColors> & {
dashes?: number[];
};
dashed?: boolean;
selected?: boolean;
}>;
create<Props extends import("../../../lib/CoreComponent").CoreComponentProps, Context extends import("../../../lib/CoreComponent").CoreComponentContext>(this: Constructor<CoreComponent<Props, Context>>, props?: Props, options?: {
readonly key?: string;
readonly ref?: ((inst: unknown) => void) | string;
}): import("../../../lib/CoreComponent").ComponentDescriptor<Props, Context>;
mount<Props extends import("../../../lib/CoreComponent").CoreComponentProps, Context extends import("../../../lib/CoreComponent").CoreComponentContext>(Component: Constructor<CoreComponent<Props, Context>>, props?: Props): CoreComponent<Props, Context>;
unmount(instance: any): void;
} | import("../../..").ECanChangeBlockGeometry | "vertical" | "horizontal" | Record<string, {
new (props: import("./Block").TBlockProps, parent: Component): Block<import("./Block").TBlock, import("./Block").TBlockProps>;
IS: "Block";
create<Props extends import("../../../lib/CoreComponent").CoreComponentProps, Context extends import("../../../lib/CoreComponent").CoreComponentContext>(this: Constructor<CoreComponent<Props, Context>>, props?: Props, options?: {
readonly key?: string;
readonly ref?: ((inst: unknown) => void) | string;
}): import("../../../lib/CoreComponent").ComponentDescriptor<Props, Context>;
mount<Props extends import("../../../lib/CoreComponent").CoreComponentProps, Context extends import("../../../lib/CoreComponent").CoreComponentContext>(Component: Constructor<CoreComponent<Props, Context>>, props?: Props): CoreComponent<Props, Context>;
unmount(instance: any): void;
}>;
protected rerender(): void;
protected subscribe(): (() => void)[];
private prepareFont;
protected unmount(): void;
protected updateChildren(): any[];
}