refactor(onConnectStart): also pass handleId closes #718
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user