From eedc470f9af7aafd28c27fa6cf96e448dc7d45c4 Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Tue, 4 Nov 2025 13:14:59 +0300 Subject: [PATCH] M: Improve focus cst label positioning --- .../dlg-show-term-graph/tg-readonly-flow.tsx | 6 +-- .../term-graph/toolbar-focused-cst.tsx | 50 ++++++++++++------- .../editor-term-graph/toolbar-term-graph.tsx | 2 +- 3 files changed, 34 insertions(+), 24 deletions(-) diff --git a/rsconcept/frontend/src/features/oss/dialogs/dlg-show-term-graph/tg-readonly-flow.tsx b/rsconcept/frontend/src/features/oss/dialogs/dlg-show-term-graph/tg-readonly-flow.tsx index 1839c070..5ed7f704 100644 --- a/rsconcept/frontend/src/features/oss/dialogs/dlg-show-term-graph/tg-readonly-flow.tsx +++ b/rsconcept/frontend/src/features/oss/dialogs/dlg-show-term-graph/tg-readonly-flow.tsx @@ -100,11 +100,9 @@ export function TGReadonlyFlow({ schema }: TGReadonlyFlowProps) { return (
-
+
+ {focusCst ? setFocusCst(null)} /> : null} - {focusCst ? ( - setFocusCst(null)} /> - ) : null}
diff --git a/rsconcept/frontend/src/features/rsform/components/term-graph/toolbar-focused-cst.tsx b/rsconcept/frontend/src/features/rsform/components/term-graph/toolbar-focused-cst.tsx index 2477a322..c9bcdb61 100644 --- a/rsconcept/frontend/src/features/rsform/components/term-graph/toolbar-focused-cst.tsx +++ b/rsconcept/frontend/src/features/rsform/components/term-graph/toolbar-focused-cst.tsx @@ -1,5 +1,7 @@ 'use client'; +import clsx from 'clsx'; + import { type IConstituenta } from '@/features/rsform/models/rsform'; import { MiniButton } from '@/components/control'; @@ -20,29 +22,39 @@ export function ToolbarFocusedCst({ focus, resetFocus, className }: ToolbarFocus const toggleFocusOutputs = useTermGraphStore(state => state.toggleFocusOutputs); return ( -
-
- +
+
+ } + onClick={resetFocus} + /> + } + onClick={toggleFocusInputs} + /> + } + onClick={toggleFocusOutputs} + /> +
+
+ Фокус {focus.alias}
- - } - onClick={resetFocus} - /> - } - onClick={toggleFocusInputs} - /> - } - onClick={toggleFocusOutputs} - />
); } diff --git a/rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-term-graph/toolbar-term-graph.tsx b/rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-term-graph/toolbar-term-graph.tsx index 4a5f53a9..e47580df 100644 --- a/rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-term-graph/toolbar-term-graph.tsx +++ b/rsconcept/frontend/src/features/rsform/pages/rsform-page/editor-term-graph/toolbar-term-graph.tsx @@ -160,7 +160,7 @@ export function ToolbarTermGraph({ className }: ToolbarTermGraphProps) {
-
+
{focusCst ? (