diff --git a/frontend/index.html b/frontend/index.html index 42b9df0..259fa93 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -5,7 +5,7 @@ - Vite + React + Labmap
diff --git a/frontend/src/components/Diagram.jsx b/frontend/src/components/Diagram.jsx index c916b47..4abcf92 100644 --- a/frontend/src/components/Diagram.jsx +++ b/frontend/src/components/Diagram.jsx @@ -198,136 +198,87 @@ function Diagram() { return (
-
-
- -
- ⏷ -
-
+
+
+ +
+ ⏷ +
+
- - - - - - - + setDiagramName(newName); + setNodes([]); + setEdges([]); + setSelectedNode(null); + setSelectedEdge(null); + } + }}>🆕 New Diagram + + + + + + + + +
{showForm && ( -
-

- 🧩 Add New Node -

- +
+

🧩 Add New Node

+ setNewLabel(e.target.value)} - style={{ - padding: '6px', - width: '100%', - borderRadius: 6, - border: '1px solid #ccc', - marginBottom: 12, - }} + style={{ padding: '6px', width: '100%', borderRadius: 6, border: '1px solid #ccc', marginBottom: 12 }} />
- +
)} @@ -351,7 +302,6 @@ function Diagram() { -
); }