+
{
const blob = new Blob([props.code], {
type: "text/plain;charset=utf-8",
});
-
window.saveAs(blob, "src.txt");
}}
>
@@ -164,9 +151,8 @@ const EditorPanel = (props) => {
props.setResize(true)}
- onMouseUp={() => props.setResize(false)}
>
diff --git a/src/pages/editor.jsx b/src/pages/editor.jsx
index 34afda4..7d27a26 100644
--- a/src/pages/editor.jsx
+++ b/src/pages/editor.jsx
@@ -12,11 +12,22 @@ export default function Editor(props) {
const [relationships, setRelationships] = useState([]);
const [areas, setAreas] = useState([]);
const [resize, setResize] = useState(false);
+ const [width, setWidth] = useState(320);
+
+ const dragHandler = (e) => {
+ if (!resize) return;
+ const w = e.clientX;
+ if (w > 320) setWidth(w);
+ };
return (
<>
-
+
setResize(false)}
+ onMouseMove={dragHandler}
+ >