refactor(props): remove onConnectStop #2299

This commit is contained in:
moklick
2022-07-25 16:08:52 +02:00
parent 37b311851c
commit efedf04a56
7 changed files with 6 additions and 29 deletions
@@ -74,7 +74,7 @@ const Handle = forwardRef<HTMLDivElement, HandleComponentProps>(
};
const onClick = (event: React.MouseEvent) => {
const { onClickConnectStart, onClickConnectStop, onClickConnectEnd, connectionMode } = store.getState();
const { onClickConnectStart, onClickConnectEnd, connectionMode } = store.getState();
if (!connectionStartHandle) {
onClickConnectStart?.(event, { nodeId, handleId, handleType: type });
store.setState({ connectionStartHandle: { nodeId, type, handleId } });
@@ -92,8 +92,6 @@ const Handle = forwardRef<HTMLDivElement, HandleComponentProps>(
doc
);
onClickConnectStop?.(event as unknown as MouseEvent);
if (isValid) {
onConnectExtended(connection);
}