feat(props): add mouse event to onConnectStart and onConnectStop

This commit is contained in:
Nate Amack
2020-08-04 12:22:38 -06:00
parent 97ec24fa14
commit fddb3e777d
4 changed files with 17 additions and 17 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ function onMouseDown(
setConnectionNodeId({ connectionNodeId: nodeId, connectionHandleType: handleType });
if (onConnectStart) {
onConnectStart({ nodeId, handleType });
onConnectStart(evt, { nodeId, handleType });
}
function resetRecentHandle(): void {
@@ -142,7 +142,7 @@ function onMouseDown(
setConnectionNodeId({ connectionNodeId: null, connectionHandleType: null });
if (onConnectStop) {
onConnectStop();
onConnectStop(evt);
}
document.removeEventListener('mousemove', onMouseMove);