diff --git a/client/src/components/UMLInterfaceNode.tsx b/client/src/components/UMLInterfaceNode.tsx index 3d0f79b..78a1245 100644 --- a/client/src/components/UMLInterfaceNode.tsx +++ b/client/src/components/UMLInterfaceNode.tsx @@ -4,7 +4,6 @@ import { Handle, Position, NodeProps } from '@xyflow/react'; // Define types for the node data and props interface UMLNodeData { label?: string; - attributes?: string[]; methods?: string[]; color?: string; removeNode?: (id: string) => void; @@ -16,23 +15,17 @@ interface UMLNodeProps extends NodeProps {} const UMLInterfaceNode: React.FC = ({ data, id }) => { const [label, setLabel] = useState(data.label || 'Interface'); - const [attributes, setAttributes] = useState(data.attributes?.join('\n') || ''); const [methods, setMethods] = useState(data.methods?.join('\n') || ''); const headerColor = data.color || '#FFEE93'; - const attributesRef = useRef(null); const methodsRef = useRef(null); useEffect(() => { - if (attributesRef.current) { - attributesRef.current.style.height = 'auto'; - attributesRef.current.style.height = `${attributesRef.current.scrollHeight}px`; - } if (methodsRef.current) { methodsRef.current.style.height = 'auto'; methodsRef.current.style.height = `${methodsRef.current.scrollHeight}px`; } - }, [attributes, methods]); + }, [methods]); const handleLabelChange = (e) => { const newLabel = e.target.value; @@ -40,12 +33,6 @@ const UMLInterfaceNode: React.FC = ({ data, id }) => { data.updateNodeData?.(id, { label: newLabel }); }; - const handleAttributesChange = (e) => { - const newAttributes = e.target.value; - setAttributes(newAttributes); - data.updateNodeData?.(id, { attributes: newAttributes.split('\n') }); - }; - const handleMethodsChange = (e) => { const newMethods = e.target.value; setMethods(newMethods); @@ -95,15 +82,6 @@ const UMLInterfaceNode: React.FC = ({ data, id }) => { X -
-