Bug fixing
This commit is contained in:
@@ -34,7 +34,12 @@ export const PageOverview: FC = () => {
|
||||
<main>
|
||||
<ScrollContainer>
|
||||
<h1>Factorio Microservices</h1>
|
||||
<ProducingGraph nodes={producingNodes} inputs={baseFactories} childType={NodeOverview} />
|
||||
<ProducingGraph
|
||||
nodes={producingNodes}
|
||||
inputs={baseFactories}
|
||||
childType={NodeOverview}
|
||||
mergeHidden={true}
|
||||
/>
|
||||
</ScrollContainer>
|
||||
</main>
|
||||
</>
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user