Skip to content

Commit b1d059c

Browse files
committed
optimize drag to connection to create node
1 parent dde8d9b commit b1d059c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/electron-frontend/src/components/workflow-editor/reactflow-connecting.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ export function onEdgeUpdateFailed(params: {
1010
setWidgetTreeContext: (context: any) => void,
1111
connectingParams: OnConnectStartParams
1212
}) {
13+
const className = (params.event.target as any).className
14+
if (typeof className !== "string" || className !== "react-flow__pane") {
15+
return
16+
}
1317
const { event, widgets, onConnect, setWidgetTreeContext, nodes, connectingParams } = params;
1418
try {
1519
const node = nodes.find(node => {

0 commit comments

Comments
 (0)