feat(props): add onEdgeUpdateEnd handler closes #1157

This commit is contained in:
moklick
2021-05-29 15:12:31 +02:00
parent f244e77b9e
commit 27e2781d8c
8 changed files with 54 additions and 25 deletions
+6 -1
View File
@@ -97,7 +97,8 @@ export function onMouseDown(
isTarget: boolean,
isValidConnection: ValidConnectionFunc,
connectionMode: ConnectionMode,
elementEdgeUpdaterType?: HandleType | null,
elementEdgeUpdaterType?: HandleType,
onEdgeUpdateEnd?: (evt: MouseEvent) => void,
onConnectStart?: OnConnectStartFunc,
onConnectStop?: OnConnectStopFunc,
onConnectEnd?: OnConnectEndFunc
@@ -178,6 +179,10 @@ export function onMouseDown(
onConnectEnd?.(event);
if (elementEdgeUpdaterType && onEdgeUpdateEnd) {
onEdgeUpdateEnd(event);
}
resetRecentHandle(recentHoveredHandle);
setConnectionNodeId({ connectionNodeId: null, connectionHandleId: null, connectionHandleType: null });