fix arrow connection
This commit is contained in:
parent
6ef92bf233
commit
f8dd179d97
1 changed files with 6 additions and 5 deletions
|
|
@ -316,10 +316,11 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
|
||||||
(node) => node.id === connection.source || node.id === connection.target
|
(node) => node.id === connection.source || node.id === connection.target
|
||||||
);
|
);
|
||||||
const sourceType = findNode?.data?.type;
|
const sourceType = findNode?.data?.type;
|
||||||
let isIo = false;
|
let isIoIn = false;
|
||||||
|
let isIoOut = false;
|
||||||
if (sourceType) {
|
if (sourceType) {
|
||||||
isIo = inputTypes.has(sourceType);
|
isIoIn = inputTypes.has(sourceType);
|
||||||
isIo = outputTypes.has(sourceType);
|
isIoOut = outputTypes.has(sourceType);
|
||||||
}
|
}
|
||||||
|
|
||||||
let newEdges: Edge[] = [];
|
let newEdges: Edge[] = [];
|
||||||
|
|
@ -340,8 +341,8 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
|
||||||
animated:
|
animated:
|
||||||
(scapeJSONParse(connection.targetHandle!) as targetHandleType)
|
(scapeJSONParse(connection.targetHandle!) as targetHandleType)
|
||||||
.type === "Text",
|
.type === "Text",
|
||||||
markerEnd: isIo ? { ...commonMarkerProps } : undefined,
|
markerEnd: isIoIn || isIoOut ? { ...commonMarkerProps } : undefined,
|
||||||
markerStart: isIo ? { ...commonMarkerProps } : undefined,
|
markerStart: isIoIn || isIoOut ? { ...commonMarkerProps } : undefined,
|
||||||
},
|
},
|
||||||
oldEdges
|
oldEdges
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue