From 2bd47df3e38ac764c48b3b27ec4b9c3bb339f732 Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Sat, 5 Aug 2023 01:14:41 +0300 Subject: [PATCH] Minor ui fixes --- rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx | 2 +- rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx index 14ee51fa..b274dae8 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx @@ -68,7 +68,7 @@ function EditorConstituenta({ activeID, onShowAST, onCreateCst, onOpenEdit, onDe } else if (schema && schema?.items.length > 0) { onOpenEdit(schema.items[0].id); } - }, [activeCst]); + }, [activeCst, onOpenEdit, schema]); function handleSubmit(event: React.FormEvent) { event.preventDefault(); diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph.tsx index 3df5c7ba..1c77af57 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph.tsx @@ -146,7 +146,7 @@ function EditorTermGraph() { onNodePointerOver={onNodePointerOver} onNodePointerOut={onNodePointerOut} cameraMode={ orbit ? 'orbit' : layout.includes('3d') ? 'rotate' : 'pan'} - layoutOverrides={ layout.includes('tree') ? { nodeLevelRatio: 1 } : undefined } + layoutOverrides={ layout.includes('tree') ? { nodeLevelRatio: schema && schema?.items.length < 50 ? 3 : 1 } : undefined } labelFontUrl={resources.graph_font} theme={darkMode ? darkTheme : lightTheme} renderNode={({ node, ...rest }) => (