refactor(edge): pass onEdgeUpdate instead of creating onConnect function

This commit is contained in:
Christopher Möller
2021-11-25 16:04:08 +01:00
parent 22f7dd6306
commit b2ac219912
3 changed files with 18 additions and 16 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import { CSSProperties, ReactNode, HTMLAttributes } from 'react';
import { Position } from './utils';
import { OnConnect, Connection } from './general';
import { Connection } from './general';
import { HandleElement } from './handles';
import { Node } from './nodes';
@@ -90,7 +90,7 @@ export interface WrapEdgeProps<T = any> {
elementsSelectable?: boolean;
hidden?: boolean;
handleEdgeUpdate: boolean;
onConnectEdge: OnConnect;
onEdgeUpdate: OnEdgeUpdateFunc;
onContextMenu?: EdgeMouseHandler;
onMouseEnter?: EdgeMouseHandler;
onMouseMove?: EdgeMouseHandler;