refactor(drag-edge): cleanup drag edge handlers

This commit is contained in:
moklick
2020-11-05 17:28:21 +01:00
parent 9dfe7ea8e3
commit 2f40a83b47
5 changed files with 47 additions and 64 deletions
+4 -3
View File
@@ -111,7 +111,8 @@ export interface WrapEdgeProps {
arrowHeadType?: ArrowHeadType;
source: ElementId;
target: ElementId;
sourceHandleId?: string;
sourceHandleId: ElementId | null;
targetHandleId: ElementId | null;
sourceX: number;
sourceY: number;
targetX: number;
@@ -121,7 +122,7 @@ export interface WrapEdgeProps {
elementsSelectable?: boolean;
markerEndId?: string;
isHidden?: boolean;
onEitherEndOfEdgePress: (event: React.MouseEvent, edge: Edge, isEdgeHeader?: boolean) => void;
onEdgeUpdate?: OnEdgeUpdateFunc;
}
export interface EdgeProps {
@@ -322,4 +323,4 @@ export type FlowTransform = {
export type TranslateExtent = [[number, number], [number, number]];
export type OnEdgeUpdateFunc = (oldEdge: Edge, newConnection: Connection) => void;
export type OnEdgeUpdateFunc = (oldEdge: Edge, newConnection: Connection) => void;