refactor(onConnectStart): also pass handleId closes #718

This commit is contained in:
moklick
2020-11-26 16:20:53 +01:00
parent 79b48c965d
commit 425fd2e3c0
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ function onMouseDown(
setConnectionNodeId({ connectionNodeId: nodeId, connectionHandleId: handleId, connectionHandleType: handleType });
if (onConnectStart) {
onConnectStart(event, { nodeId, handleType });
onConnectStart(event, { nodeId, handleId, handleType });
}
function resetRecentHandle(): void {
+1
View File
@@ -284,6 +284,7 @@ export type ConnectionLineComponent = React.ComponentType<ConnectionLineComponen
export type OnConnectFunc = (connection: Connection) => void;
export type OnConnectStartParams = {
nodeId: ElementId | null;
handleId: ElementId | null;
handleType: HandleType | null;
};
export type OnConnectStartFunc = (event: ReactMouseEvent, params: OnConnectStartParams) => void;