Open xuhongxu96 opened 4 years ago
export interface Node<T> {
layout: IRect;
title: string;
input: Port[];
output: Port[];
// For customization
type: string;
data: T;
}
export interface NodeConfig {
styles: {
[type: string]: {
component: React.Component;
config: any;
};
};
}
export interface DraftEdgeConfig {
typeMapFn: (startPort: IPortMeta) => string;
styles: {
[type: string]: {
component: React.Component;
config: any;
};
};
}
export interface Edge<T> {
start: NodePort;
end: NodePort;
type: string;
data: T;
}
export interface EdgeConfig {
styles: {
[type: string]: {
component: React.Component;
config: any;
};
};
}
TBD
What "Customizable" means?
Users can do easy customization by modifying a config. Users can do deep customization by replace them with their own components.
We want to support both scenarios.
Customizable Parts