From 9c336e324b745ee4b74d189d14cec8891e9240da Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Wed, 30 Oct 2024 19:56:48 +0300 Subject: [PATCH] R: Improve OSS rendering --- .../src/pages/OssPage/EditorOssGraph/OssFlow.tsx | 15 +++------------ .../EditorOssGraph/{ => graph}/InputNode.tsx | 0 .../EditorOssGraph/{ => graph}/NodeCore.tsx | 2 +- .../EditorOssGraph/{ => graph}/OperationNode.tsx | 0 .../OssPage/EditorOssGraph/graph/OssNodeTypes.ts | 9 +++++++++ rsconcept/frontend/src/styling/overrides.css | 4 ++++ 6 files changed, 17 insertions(+), 13 deletions(-) rename rsconcept/frontend/src/pages/OssPage/EditorOssGraph/{ => graph}/InputNode.tsx (100%) rename rsconcept/frontend/src/pages/OssPage/EditorOssGraph/{ => graph}/NodeCore.tsx (98%) rename rsconcept/frontend/src/pages/OssPage/EditorOssGraph/{ => graph}/OperationNode.tsx (100%) create mode 100644 rsconcept/frontend/src/pages/OssPage/EditorOssGraph/graph/OssNodeTypes.ts diff --git a/rsconcept/frontend/src/pages/OssPage/EditorOssGraph/OssFlow.tsx b/rsconcept/frontend/src/pages/OssPage/EditorOssGraph/OssFlow.tsx index 15196677..b2982642 100644 --- a/rsconcept/frontend/src/pages/OssPage/EditorOssGraph/OssFlow.tsx +++ b/rsconcept/frontend/src/pages/OssPage/EditorOssGraph/OssFlow.tsx @@ -9,7 +9,6 @@ import { getViewportForBounds, Node, NodeChange, - NodeTypes, ReactFlow, useEdgesState, useNodesState, @@ -29,9 +28,8 @@ import { PARAMETER, storage } from '@/utils/constants'; import { errors } from '@/utils/labels'; import { useOssEdit } from '../OssEditContext'; -import InputNode from './InputNode'; +import { OssNodeTypes } from './graph/OssNodeTypes'; import NodeContextMenu, { ContextMenuData } from './NodeContextMenu'; -import OperationNode from './OperationNode'; import ToolbarOssGraph from './ToolbarOssGraph'; interface OssFlowProps { @@ -312,14 +310,6 @@ function OssFlow({ isModified, setIsModified }: OssFlowProps) { } } - const OssNodeTypes: NodeTypes = useMemo( - () => ({ - synthesis: OperationNode, - input: InputNode - }), - [] - ); - const graph = useMemo( () => (