diff --git a/frontend/pages/sch.js b/frontend/pages/sch.js new file mode 100644 index 00000000..dac3a141 --- /dev/null +++ b/frontend/pages/sch.js @@ -0,0 +1,72 @@ +import React, { useRef } from "react"; +import { Box } from "@chakra-ui/react"; +import Schematic from "../src/components/schematic"; +import Xarrow, { Xwrapper, useXarrow } from "react-xarrows"; + +const Sch = () => { + const updateXarrow = useXarrow(); + const ref1 = useRef(null); + const ref2 = useRef(null); + const ref3 = useRef(null); + const ref4 = useRef(null); + return ( + + + + + + + + + + + + ); +}; + +export default Sch; diff --git a/frontend/src/components/Schematic.js b/frontend/src/components/Schematic.js new file mode 100644 index 00000000..920800d8 --- /dev/null +++ b/frontend/src/components/Schematic.js @@ -0,0 +1,49 @@ +import React from "react"; +import Draggable from "react-draggable"; +import { Box, Container } from "@chakra-ui/react"; +import { useXarrow } from "react-xarrows"; +const Schematic = React.forwardRef(({ def }, ref) => { + const updateXarrow = useXarrow(); + const eventLogger = (e, data) => { + console.log("Event: ", e); + console.log("Data: ", data); + }; + + const handleStart = (e) => { + console.log(e); + }; + + const handleDrag = (e) => { + console.log(e); + }; + + const handleStop = (e) => { + console.log(e); + }; + + console.log("def", def); + + return ( + + + hmm? + + + // + // hmm? + // + ); +}); + +export default Schematic;