Merge branch 'v10' into refactor/nodes-edges-state

This commit is contained in:
moklick
2021-10-20 10:52:11 +02:00
27 changed files with 700 additions and 365 deletions
+18 -5
View File
@@ -93,6 +93,18 @@ export enum ArrowHeadType {
ArrowClosed = 'arrowclosed',
}
export interface EdgeMarker {
type: ArrowHeadType;
color?: string;
width?: number;
height?: number;
units?: string;
orient?: string;
strokeWidth?: number;
}
export type EdgeMarkerType = string | EdgeMarker;
export interface Edge<T = any> {
id: ElementId;
type?: string;
@@ -108,13 +120,14 @@ export interface Edge<T = any> {
labelBgBorderRadius?: number;
style?: CSSProperties;
animated?: boolean;
arrowHeadType?: ArrowHeadType;
isHidden?: boolean;
data?: T;
className?: string;
sourceNode?: Node;
targetNode?: Node;
isSelected?: boolean;
markerStart?: EdgeMarkerType;
markerEnd?: EdgeMarkerType;
}
export enum BackgroundVariant {
@@ -150,7 +163,6 @@ export interface WrapEdgeProps<T = any> {
labelBgPadding?: [number, number];
labelBgBorderRadius?: number;
style?: CSSProperties;
arrowHeadType?: ArrowHeadType;
source: ElementId;
target: ElementId;
sourceHandleId: ElementId | null;
@@ -162,7 +174,6 @@ export interface WrapEdgeProps<T = any> {
sourcePosition: Position;
targetPosition: Position;
elementsSelectable?: boolean;
markerEndId?: string;
isHidden?: boolean;
handleEdgeUpdate: boolean;
onConnectEdge: OnConnectFunc;
@@ -173,6 +184,8 @@ export interface WrapEdgeProps<T = any> {
edgeUpdaterRadius?: number;
onEdgeUpdateStart?: (event: React.MouseEvent, edge: Edge) => void;
onEdgeUpdateEnd?: (event: MouseEvent, edge: Edge) => void;
markerStart?: EdgeMarkerType;
markerEnd?: EdgeMarkerType;
}
export interface EdgeProps<T = any> {
@@ -194,11 +207,11 @@ export interface EdgeProps<T = any> {
labelBgPadding?: [number, number];
labelBgBorderRadius?: number;
style?: CSSProperties;
arrowHeadType?: ArrowHeadType;
markerEndId?: string;
data?: T;
sourceHandleId?: ElementId | null;
targetHandleId?: ElementId | null;
markerStart?: string;
markerEnd?: string;
}
export interface EdgeSmoothStepProps<T = any> extends EdgeProps<T> {
borderRadius?: number;