|
@@ -167,6 +167,7 @@ const generateInputs = (graph: any, id: any) => {
|
|
const edges = graph.getIncomingEdges(id);
|
|
const edges = graph.getIncomingEdges(id);
|
|
if (edges?.length > 0) {
|
|
if (edges?.length > 0) {
|
|
edges.forEach((item: any, index: any) => {
|
|
edges.forEach((item: any, index: any) => {
|
|
|
|
+ // 获取source的输出pin脚
|
|
const sourceNode = item.getSourceNode();
|
|
const sourceNode = item.getSourceNode();
|
|
const sourcePortID = item.getSourcePortId();
|
|
const sourcePortID = item.getSourcePortId();
|
|
const sourcePorts = sourceNode.getPortsByGroup('bottom');
|
|
const sourcePorts = sourceNode.getPortsByGroup('bottom');
|
|
@@ -177,7 +178,14 @@ const generateInputs = (graph: any, id: any) => {
|
|
: sourcePorts.indexOf(
|
|
: sourcePorts.indexOf(
|
|
sourcePorts.find((item: any) => item.id === sourcePortID)
|
|
sourcePorts.find((item: any) => item.id === sourcePortID)
|
|
);
|
|
);
|
|
- inputsResult[`input${index}`] = [sourceId, portNumber];
|
|
|
|
|
|
+ // 获取target输入pin脚
|
|
|
|
+ const targetNode = item.getTargetNode();
|
|
|
|
+ const targetPortID = item.getTargetPortId();
|
|
|
|
+ const targetPorts = targetNode.getPortsByGroup('top');
|
|
|
|
+ const inputPortIndex = targetPorts.indexOf(
|
|
|
|
+ targetPorts.find((item: any) => item.id === targetPortID)
|
|
|
|
+ );
|
|
|
|
+ inputsResult[`input${inputPortIndex}`] = [sourceId, portNumber];
|
|
});
|
|
});
|
|
}
|
|
}
|
|
return inputsResult;
|
|
return inputsResult;
|