Bug fixing

This commit is contained in:
Sebastian Seedorf
2022-08-19 12:58:48 +02:00
parent 2b913c6014
commit 58c3b1a3c3
4 changed files with 111 additions and 45 deletions

View File

@@ -16,17 +16,19 @@ interface Props<T extends Dict<unknown>> {
inputs: string[]
outputs?: string[]
childType: FC<HTMLProps<HTMLDivElement> & { node: GraphNode<T> }>
mergeHidden?: boolean
}
export const ProducingGraph = <T extends Dict<unknown>>({
nodes,
inputs,
outputs,
childType: ChildType
childType: ChildType,
mergeHidden
}: PropsWithChildren<Props<T>>) => {
const planeRef = useRef<HTMLDivElement>(null)
const [[rows, nodeMap]] = useState<[string[][], Dict<GraphNodeWithIds<T | AdditionalNode>>]>(
graphUntangled(nodes, inputs, outputs ?? [], 3000)
graphUntangled(nodes, inputs, outputs ?? [], { timeLimit: 3000, mergeHidden })
)
useEffect(() => {