-
Notifications
You must be signed in to change notification settings - Fork 6
/
react-cytoscapejs.d.ts
35 lines (31 loc) · 1.05 KB
/
react-cytoscapejs.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
declare module "react-cytoscapejs" {
import cytoscape, { NodeDataDefinition, EdgeDataDefinition } from "cytoscape";
import { Stylesheet, LayoutOptions, ElementDefinition } from "cytoscape";
import { FC, CSSProperties } from "react";
type CytoscapeComponentProps = {
id?: string;
cy?: (cy: cytoscape.Core) => void;
style?: CSSProperties;
elements: ElementDefinition[];
layout?: LayoutOptions;
stylesheet?: Stylesheet | Stylesheet[] | string;
className?: string;
zoom?: number;
pan?: Position;
minZoom?: number;
maxZoom?: number;
zoomingEnabled?: boolean;
userZoomingEnabled?: boolean;
boxSelectionEnabled?: boolean;
autoungrabify?: boolean;
autounselectify?: boolean;
};
interface CytoscapeComponentInterface extends FC<CytoscapeComponentProps> {
static normalizeElements(data: {
nodes: ElementDefinition[];
edges: ElementDefinition[];
} | ElementDefinition[]): ElementDefinition[];
}
const CytoscapeComponent: CytoscapeComponentInterface;
export = CytoscapeComponent;
}