Skip to content

Commit

Permalink
refactor(handle): only listen to left click events closes #1852
Browse files Browse the repository at this point in the history
  • Loading branch information
moklick committed Feb 22, 2022
1 parent 67b71a9 commit a45af5f
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions src/components/Handle/index.tsx
Expand Up @@ -76,21 +76,23 @@ const Handle = forwardRef<HTMLDivElement, HandleComponentProps>(

const onMouseDownHandler = useCallback(
(event: React.MouseEvent) => {
onMouseDown(
event,
handleId,
nodeId,
store.setState,
onConnectExtended,
isTarget,
isValidConnection,
connectionMode,
undefined,
undefined,
onConnectStart,
onConnectStop,
onConnectEnd
);
if (event.button === 0) {
onMouseDown(
event,
handleId,
nodeId,
store.setState,
onConnectExtended,
isTarget,
isValidConnection,
connectionMode,
undefined,
undefined,
onConnectStart,
onConnectStop,
onConnectEnd
);
}
},
[
handleId,
Expand Down

0 comments on commit a45af5f

Please sign in to comment.