From b877750ecf66b11d34df02bd63e8b1bace8b208f Mon Sep 17 00:00:00 2001 From: Alina Date: Tue, 17 Feb 2026 22:58:28 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8?= =?UTF-8?q?=D0=BE=D0=BD=D0=B0=D0=BB=20=D1=81=D0=BA=D1=80=D1=8B=D1=82=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BF=D0=BE=D0=B4=D0=BF=D0=B8=D1=81=D0=B5=D0=B9=20+?= =?UTF-8?q?=20fix:=20build=20output=20=D0=B2=20=D0=BA=D0=BE=D1=80=D0=BD?= =?UTF-8?q?=D0=B5=D0=B2=D0=BE=D0=B9=20dist/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Свитч «Подписи» в тулбаре теперь скрывает/показывает подписи на линиях и портах через visibility toggle - vite outDir перенесён в ../dist для совместимости с react.Dockerfile Co-Authored-By: Claude Opus 4.6 --- frontend/src/features/schema/SchemaCanvas.tsx | 41 ++++++++++++++++++- frontend/vite.config.ts | 2 + 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/frontend/src/features/schema/SchemaCanvas.tsx b/frontend/src/features/schema/SchemaCanvas.tsx index e90c45a..01fc2fd 100644 --- a/frontend/src/features/schema/SchemaCanvas.tsx +++ b/frontend/src/features/schema/SchemaCanvas.tsx @@ -189,7 +189,7 @@ export function SchemaCanvas() { // eslint-disable-next-line react-hooks/exhaustive-deps }, []); - // Sync display settings + // Sync display settings: grid useEffect(() => { const graph = useSchemaStore.getState().graph; if (!graph) return; @@ -201,6 +201,45 @@ export function SchemaCanvas() { } }, [displaySettings.showGrid]); + // Sync display settings: labels + useEffect(() => { + const graph = useSchemaStore.getState().graph; + if (!graph) return; + + const show = displaySettings.showLabels; + + // Toggle edge labels + for (const edge of graph.getEdges()) { + const labels = edge.getLabels(); + if (labels.length > 0) { + edge.setLabels( + labels.map((label) => ({ + ...label, + attrs: { + ...label.attrs, + label: { + ...(label.attrs?.label as Record), + visibility: show ? 'visible' : 'hidden', + }, + rect: { + ...(label.attrs?.rect as Record), + visibility: show ? 'visible' : 'hidden', + }, + }, + })), + ); + } + } + + // Toggle port labels + for (const node of graph.getNodes()) { + const ports = node.getPorts(); + for (const port of ports) { + node.setPortProp(port.id!, 'attrs/text/visibility', show ? 'visible' : 'hidden'); + } + } + }, [displaySettings.showLabels]); + return (